PJ Hile

Don’t worry, I’m from the Internet.

PJ Hile header image 2

Command line script to recursively delete .svn folders from a directory

January 17th, 2008 · 2 Comments

find ./ -name ".svn" | xargs rm -Rf

source: http://www.rickhurst.co.uk/category/linux/

Tags: Uncategorized

2 responses so far ↓

  • 1 Will Robertson // Jan 28, 2008 at 6:38 pm

    Hi,

    I had this same problem and used this instead:
    find . -name .svn -exec rm -rf {} \;

    The only difference being that the xargs method doesn’t quote the filename, so whitespace messes things up. Only a problem if you’re one of those people that puts spaces in filenames :)

    Oh, and I needed sudo to remove locks on all the svn files too, but that might have been more of a problem on my end.

  • 2 Sulis // Oct 28, 2008 at 5:31 pm

    Interesting to know.

Leave a Comment