Delete the specific files in all subdirectories

  1. check the find result

    find . -name “*.bak” -type f

  2. delete it

    find . -name “*.bak” -type f -delete

Ref. ask Ubuntu: How can I recursively delete all files of a specific extension in the current directory?

This entry was posted in Linux. Bookmark the permalink.