find svn directories and remove them

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:

2 thoughts on “find svn directories and remove them

  1. Simon,
    Sometimes there are too many files for find to execute like that. “xargs” with those parameters will prevent that error from occurring.

Leave a Reply

Your email address will not be published. Required fields are marked *