Home > Linux, Web Development > Delete .svn folders recursively using command line

Delete .svn folders recursively using command line

October 5th, 2009

some times i work on small projects with friends and we use Subversion to track and store code changes, collaborate, and share project files so once we finish we usually upload it somewhere by copying the whole project folder so i face that subversion makes folder inside each folder in the project called “.svn” and that take time to remove manually and unnecessary size to upload
so i run a command inside the project folder to remove that folders recursively before upload.

Run this:

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

  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn
  • Twitter

Khalil Majdalawi Linux, Web Development , ,

  1. October 18th, 2009 at 09:51 | #1

    Thanks for the tip. I actually use something similar to that on Windows, but found using tools like TortoiseSVN makes it easier to simply export the Tree project folder to a different folder, and get a clean copy of your latest code changes.

  2. October 18th, 2009 at 10:06 | #2

    yah you are right but some times i like the command line its faster and making me feel good about my self :)

  3. October 21st, 2009 at 15:20 | #3

    Thanks, a simpler command is rm -rf $(find . -iname .svn)

  1. No trackbacks yet.