Skip to content

Instantly share code, notes, and snippets.

@stami
Created September 3, 2014 15:08
Show Gist options
  • Save stami/46db7d7dd18c1279e770 to your computer and use it in GitHub Desktop.
Save stami/46db7d7dd18c1279e770 to your computer and use it in GitHub Desktop.
Recursively remove files by extension
find /ABSOLUTE/PATH/TO/DIRECTORY/ -iname "*.EXTENSION" -exec rm '{}' ';'
# Confirm each one
find /ABSOLUTE/PATH/TO/DIRECTORY/ -iname "*.EXTENSION" -ok rm '{}' ';'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment