Skip to content

Instantly share code, notes, and snippets.

@gringoh
Last active May 13, 2020 15:21
Show Gist options
  • Save gringoh/04f96bd7ef2f6f2aeceeb3c1279a6e22 to your computer and use it in GitHub Desktop.
Save gringoh/04f96bd7ef2f6f2aeceeb3c1279a6e22 to your computer and use it in GitHub Desktop.
[bash: Delete dot files recursively] #bash
find . -name ".*" -print
# I don't know the MAC OS, but that is how you find them all in most *nix environments.
find . -name ".*" -exec rm -rf {} \;
# to get rid of them... do the first find and make sure that list is what you want before you delete them all.
# The first "." means from your current directory. Also note the second ".*" can be changed to ".svn*" or any other more specific name; the syntax above just finds all hidden files, but you can be more selective. I use this all the time to remove all of the .svn directories in old code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment