Comand line to clear .svn directories

Here’s a shortcut to delete all .svn directories in linux:

 
find -type d -name .svn -exec rm -rf {} \;
 

the -type d specifies the type is directory, -name will search the patter and -exec will execute the comand. As for the {} will get the current filename processed.

Tags: ,
Linux & Open Source, System Administration |

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

well that works on mac by omitting the `-type` option, the type is just a check for me to ensure i am deleting directory.

In your case the script says ‘anything that match ‘.svn’ will be deleted :P

Leave a comment

(required)

(required)