I have a hard drive that contains about 300,000 x 3 files that were written by a recovery program.
Some of these files are in the format:
.doc.apple.quarantine
These are easy to remove:
find . -type f -name '*.apple.quarantine' -delete
But others are more difficult because they have the phrase
_AFP_Afpinfo which may have been written after the file extension, e.g.
happybirthday.mp3._AFP_afpinfo
or just
happybirthday_AFP_Afpinfo
I would like to delete the third type of file, i.e.:
happybirthday_AFP_Afpinfo
so my question is whether this Unix command will delete all files that contain the characters AFP_Afpinfo?
find . -type -f 'AFP_Afpinfo' -delete
I tested
-find . -type -f -name 'epub' -print
and no files displayed.
I tried
-find -type -f -name 'epub' -print
and files displayed. So the use of the period after find was incorrect.
After running 1/2 hour or so, running:
find -type f -name '_AFP_Afpinfo'
the following error was displayed:
find: './.Trash-1000/files': Input/output error
I checked that directory and it's full of AFP_Afpinfo files.