find . -name ".svn*" -print0|xargs -0 rm -rvf
CodeSnippets: Recursively remove all .svn directories [shell] [svn] [bash]
Recursively remove all .svn directories
find . -name .svn -print0 | xargs -0 rm -rf
Update: Thankyou iburrell
find . -name ".svn*" -print0|xargs -0 rm -rvf CodeSnippets: Recursively remove all .svn directories [shell] [svn] [bash]
|
The other problem is any file with spaces in the name will cause bash to treat it as two arguments. Which could give an error or could delete the wrong file. find -print0 and xargs -0 solve this problem.