Entrepreneur Geek

Nirav Mehta on life, technology and future

Recursively delete all .svn folders

with 2 comments

Needed to quickly delete all .svn folders and files within them from a machine where svn client was not setup.

Here’s how:
#!/bin/sh
echo "recursively removing .svn folders from"
pwd
rm -rf `find . -type d -name .svn`

Taken from: Any Example

Related posts:

  1. Recursively unlock files on Mac OS X I copied some songs from a CD and ended up...
  2. Finding number of lines in files recursively I wanted to find the number of lines from a...

Written by Nirav

September 5th, 2007 at 9:57 am

Posted in GNU/Linux

 

2 Responses to 'Recursively delete all .svn folders'

Subscribe to comments with RSS or TrackBack to 'Recursively delete all .svn folders'.

  1. One more way:

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

    shashi

    5 Sep 07 at 11:10 pm

  2. Single quote is not working on Linux
    find . -type d -name ‘.svn’ -exec rm -rf {} \;

    The right way is:
    find . -type d -name “.svn” -exec rm -rf {} \;

    Sanjay

    2 Jan 08 at 2:34 pm

Leave a Reply