Tuesday, July 21, 2015

Adding a directory recursively to CVS

First add the enclosing directory and cd into it.  Then add all the directories except CVS.

find . -type d \! -name CVS -exec cvs add '{}' \;

Then add all the files, except any in the CVS directories.

find . \( -type d -name CVS -prune \) -o \( -type f -exec cvs add '{}' \; \)