01 May 2008
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 I found a nice way to recursively remove these via the Terminal.
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 command before proceeding
You can check for the existence of
.svn folders with the command:
$ find . -type d -name .svn
You can now delete these by passing this search into the
rm command 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.
Author: Ant Cooper