find . -name .svn -print0 | xargs -0 rm -rf
Update: Thankyou iburrell
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
find . -name .svn -exec rm -rf {} \;
You need to create an account or log in to post comments to this site.
» Update All of the SVN Versio... in shell svn bash subversion
» Bash script to perform initi... in rails shell svn bash script
» sup: bash script for univers... in shell svn bash darcs cvs scm svk arch perforce
» Pretty PS1 Prompt for Bash in shell bash bashrc prompt
» Bash function to copy SSH DS... in ssh shell zsh bash
» How to flush the local DNS c... in lighttpd virtualhosting shell bash hosts dns cache
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails
The other problem is any file with spaces in the name will cause bash to treat it as two arguments. Which could give an error or could delete the wrong file. find -print0 and xargs -0 solve this problem.
The other way is to do: