Mittwoch, 5. November 2008

How to delete a directory recursively ...

I use subversion for version control. That means that I have those little .svn directories all over the place. I was wondering if there is an easy approach to remove those folders in all of the subdirectories with a single command. And I came upon this solution:

find . -name .svn -type d -exec rm -r {} \;

1 Kommentare:

schluppy hat gesagt…

Hi Michael,

it is saver and faster to use find & rm it as follow.

find /PATH -type d -name .svn -print0 | xargs -r0 rm -r


with regards from schluppy