I had every file twice, and I needed to delete every second file. Find just returned me random files, so I added sorting. Now it looks like this:
#!/bin/bash DIRNAME="<directoryNameContainingYourFiles>" for file in `find $DIRNAME -type f | sort | awk 'NR % 2 == 0'`; do echo "going to modify" $file
put this in a file called scriptName, run
chmod +x scriptName
and run it by calling
./scriptName
user3387542
source share