Bidvertiser

Wednesday, May 1, 2013

How to delete all svn folders using mac terminal

How to delete .svn folders

On the process of importing my svn repository to my git (without history),  I wanted to delete all .svn folders from my project without deleting the rest of the content.  Here are the steps to do that,

cd /the root folder of your project
find . -type d -name '.svn' -print -exec rm -rf {} \;
  1. cd --> change directory to the root folder of your project.
  2. find . --> find in the current directory
  3. -type d --> file type directory
  4. -name '.svn' --> file name .svn
  5. -print --> print what matched up to this point (the .svn dirs)
  6. -exec rm -rf --> exec the command rm -rf (thing found from find)
  7. {} --> place holder for out from find
  8. /; --> / to escape ; and ' is to tell find that the command for exec is done

No comments:

Post a Comment