Fork me on GitHub

bill-ingram.com

Programming | Web Design | Photography

Recursively Delete .svn Directories

Finding all the .svn directories is easy

1
2
3
4
5
6
$ find . -type d -name .svn
./.svn
./sourceA/.svn
./sourceB/.svn
./sourceB/module/.svn
./sourceC/.svn

Now use command substitution with rm -rf.

1
rm -rf `find . -type d -name .svn`

Note the use of the backtick symbol (located under the ~ on the English keyboard)—that is not a single quote.

Comments