Remove hidden .svn folders

Occasionally I want to copy some folders from one project to another using Finder, however, this also copies hidden .svn folders over which can cause problems later on. So after a little googling I found a nice way to recursively remove all .svn folders via the Terminal.

1 .Fire up Terminal.app and move to the folder you just copied:

$ cd Sites/mynewsite

Please double check you’re in the right folder with pwd before proceeding

2. You can check for the existence of .svn folders with the command:

$ find . -type d -name .svn

3. You can now pass this search into rm using grave accents (the backwards slanting ones to the left of the Z key)

$ rm -rf `find . -type d -name .svn`

Nice. If you were being really clever you could put this lot into a nice shell script to avoid having to remember the commands.

0 Responses to “Remove hidden .svn folders”


  1. No Comments

Leave a Reply