find . -name ".svn" -print0 | xargs -0 -n 1024 -r rm -rf
-n prevents rm too many arguments error
-r prevents execution if none found (and prevents error!)
originally from:
http://www.commandlinefu.com/commands/view/902/delete-all-.svn-directories-from-current-path-recursive
find svn directories and remove them
by
Tags:
Comments
2 Responses to “find svn directories and remove them”
-
Why make life difficult? Try
find -name “.svn” -exec rm -rf {} ; -
Simon,
Sometimes there are too many files for find to execute like that. “xargs” with those parameters will prevent that error from occurring.
Cheers,
Leave a Reply