This script uses the rm and find commands to recursively delete .svn folders. rm and find can be found on all UNIX based operating systems including Linux and OS X.
1 #!/bin/sh 2 3 echo "recursively removing .svn folders from" 4 pwd 5 rm -rf `find . -type d -name .svn` 6
works great! thanks!!
or, to avoid the use of a subshell:
find . -type d -name .svn -exec rm {} \;
That does not work on OSX: you get “Operation not permitted”. I don’t know but there is something very nasty about these .svn files, something keeps them locked down..
[...] For Geniuses ยป Shell Script to Delete .svn Folders Shell Script to Delete .svn Folders rm -rf `find . -type d -name .svn` [...]