Skip to content

Instantly share code, notes, and snippets.

@xiel
Created February 18, 2019 22:36
Show Gist options
  • Save xiel/4ba1cbb53743351524722c779c7e0e87 to your computer and use it in GitHub Desktop.
Save xiel/4ba1cbb53743351524722c779c7e0e87 to your computer and use it in GitHub Desktop.
Delete all folders with a specific name recursively (including their contents)
Delete all folders with given name, example “.svn” etc.
find . -type d -name '.svn' -print -exec rm -rf {} \;
find . -type d -name '.idea' -print -exec rm -rf {} \;
find . -type d -name '.sass-cache' -print -exec rm -rf {} \;
find . -type d -name 'node_modules' -print -exec rm -rf {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment