unix command to delete the .svn folders
This command will delete all those pesky .svn directories that have been left by subversion:-
find ./ -name ".svn" | xargs rm -Rf
(obviously you will want to keep the .svn folders if you are still using subversion)
October 17th, 2006 at 3:16 pm
Or a slightly safer version:
find . -name “.svn” -print0 | xargs -0 rm -Rf
(those are zeros, not ohs, if your font shows them ambigiously)
This is slightly safer as is used a null byte () as the delimiter between entries, rather than a space. This means that if I happen to have a folder called “foo” and one with spaces in called “foo bar”, you might find a .svn dir present in “foo bar” will cause the whole of the “foo” directory to be deleted.
-Matt
January 9th, 2007 at 2:57 pm
Thanks a bunch for this… Looking for an easy way to remove the .svn dirs without having to go to each directory. Saved me some serious time.
March 6th, 2007 at 10:18 pm
Thanks a thousand. You too, Matt.
February 28th, 2009 at 4:53 am
I use this to delete temp mac osx files
find . -name “._*” -print0 | xargs -0 rm -Rf
handy to run before uploading a project via ftp.
March 6th, 2010 at 10:54 am
Depending on the situation, you might be able to just use the ’svn export’ to check out a clean tree?