cd $TargetDir && find . -name .svn -type d -print0 | xargs -0 rm -rfFind directories named .svn in or below the current directory and delete them, processing filenames in such a way that file or directory names containing spaces or newlines are correctly handled.