Skip to content

Instantly share code, notes, and snippets.

@chichunchen
Created January 26, 2015 19:50
Show Gist options
  • Save chichunchen/6d20d18987ed5a825fbf to your computer and use it in GitHub Desktop.
Save chichunchen/6d20d18987ed5a825fbf to your computer and use it in GitHub Desktop.
Recursively delete all files of a specific extension in the current directory
You don't even need to use rm in this case if you are afraid. Use find:
find . -name "*.bak" -type f -delete
But use it with precaution. Run first:
find . -name "*.bak" -type f
http://askubuntu.com/questions/377438/how-can-i-recursively-delete-all-files-of-a-specific-extension-in-the-current-di
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment