Study Guides | | Find command

Study Guide: Find command

  • Recursive from current location. No need for -R.
  • Put filename in ""
  • -i for interactive with warnings

Find .JPG files

find . -name "*.JPG*"

Delete those pesky duplicate files so easily created in macOS

find . -name "* 2.PNG" -delete
find . -name "* 2.JPG" -delete

Delete files by filename

find . -name "*-thumb*" -delete
find . -name "*index.php" -delete
Source: https://class.ronliskey.com/study/computing/unix-find-command/