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
» sup: bash script for univers... in shell svn bash darcs cvs scm svk arch perforce
» Subscribe to a RSS feed of y... in apache php mysql find awk email lighttpd ruby rails ssh date perl regex shell textpattern svn osx mac css python google html bash subversion backup script sql javascript dom expressionengine java flash actionscript rubyonrails unix linux applescript cli c ajax image xml terminal file web sed list delphi administration directory
» Get Two Properties From Entity in apache php mysql find awk lighttpd ruby rails ssh date perl regex shell textpattern svn http osx mac css python google html bash subversion windows sql activerecord javascript expressionengine java actionscript rubyonrails unix linux applescript cli database c text ajax image string xml terminal file array web delphi administration convert
» Get String Properties From E... in apache php mysql find awk lighttpd ruby rails ssh date perl regex shell textpattern svn http osx mac css python google html bash subversion windows sql activerecord javascript expressionengine java actionscript rubyonrails unix linux applescript cli database c text ajax image string xml terminal file array web delphi administration convert
» Extending acts_as_taggable f... in apache php mysql find awk lighttpd ruby rails ssh date perl regex shell textpattern svn http osx mac css python google html bash subversion windows sql activerecord javascript expressionengine java actionscript rubyonrails unix linux applescript cli database c text ajax image string xml terminal file array web delphi administration convert
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: