Skip to content

Instantly share code, notes, and snippets.

@jnwelzel
Created February 27, 2014 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnwelzel/9255629 to your computer and use it in GitHub Desktop.
Save jnwelzel/9255629 to your computer and use it in GitHub Desktop.
recursive-delete-file-type-in-linux

#First "cd" to the top directory you want to start in. (Don't be stupid and run this from your root....)

To get a confirmation for every file use: find . -type f -name "*.bak" -exec rm -i {} \;

Or if you're feeling confident use: find . -type f -name "*.bak" -exec rm -f {} \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment