Quick way to remove all folders titled CVS in a directory and it's subdirectories?

818 views Asked by At

I have been using CVS and am having trouble when moving files from other projects. Is there a easy way to remove all folders [and subfolders] with the name 'CVS' so that i can add them correctly to my new cvs repo?

2

There are 2 answers

2
bratkartoffel On BEST ANSWER

First try to find them find . -name CVS, then remove them find . -name CVS -delete. If you'd like to ensure that only folders are removed, just add the -type d option to the find commands.

Another possible solution with more information during the search and deletion: find . -type d -name CVS -exec rm -rv {} \;

1
Thomas Ayoub On

Use find:

find . -iname "*cvs*" -delete