Never been to DZone Snippets before?

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

Remove all .svn folders in a directory tree (See related posts)

// You did a checkout when you really wanted to do an export.
// Now there are tons of .svn folders in your project, and you need them to go away.
// Shell scripting to the rescue.

// Credit: Zed Shaw, at the Mongrel mailing list.

find . -name ".svn" -exec rm -rf {} \;

Comments on this post

pvdb posts on May 16, 2008 at 08:18
Or - if you're anally retentive like me :-) ...

find . -name ".svn" -type d -exec rm -rf {} \;


... which only deletes directories named ".svn"

You need to create an account or log in to post comments to this site.


Click here to browse all 5147 code snippets

Related Posts