Removing .svn directories, recursively

August 13th, 2008

This command can be handy. Let say you want to archive your project from the repository and you don’t want to include the ‘.svn‘ directories.

First, checkout your project from the repository:

svn co http://myproject.domain.org/svn/trunk/ myproject-dir

Second, remove the .svn directories:

rm -rf `find myproject-dir -type d -name .svn`

Then archive it using tar command:

tar -cvzf myproject_archive.tgz myproject-dir

…and there you have it!

Share this Post

  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati

Tags: ,

Leave a Reply