How to delete all files found by this command?
find -type f -name "*-thumb.png"
How to delete all files found by this command?
find -type f -name "*-thumb.png"
find -type f -name "*-thumb.png" -exec rm {} \;
If you need a prompt to confirm deletion, use -ok
in place of -exec
as:
find -type f -name "*-thumb.png" -ok rm {} \;
find -type f -name "*-thumb.png" -delete
Will work as well. I use it very often after merge resolutions on Git to remove the ".orig" files that Git creates.
man find
--> look for delete – Marki Dec 27 '14 at 22:23