Two Useful .svn Bash Scripts

1. Remove all files except .svn

This is used when your development version is not under source control directly, but copy and paste current development version into source control.

  find  .  –type f  \! –path \*/\.svn/\* | xargs rm 

2. Remove all .svn files

This is used when you try to get a clean copy from your local svn controlled source code, you can also achieve this by export current svn repository

  find  .  –name  .svn |  xargs  rm –rf 

Tags:

This entry was posted on Monday, April 4th, 2011 at 12:10 am and is filed under Java, Software Engineering. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response to “Two Useful .svn Bash Scripts”

  1. palhmbs says:

    find can exec a command too!

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

Leave a Reply

*