Spiro Trikaliotis wrote:
> Ok. I assume there are no file names that are insecure to use on the
> command line! The same holds true for directory names.
> 
> Then you can add all directories by using
> 
> $ find . -type d | grep -v \/CVS$ | tr \\n \\0 | xargs -0 -n 10 cvs add --

The find command is flexible enough to do most of the work itself:

$ find . -type d \( -name CVS -prune -o -print0 \) | xargs -0 -n 10 cvs
add --

and this variation should be safe regardless of what crazy characters
are present in filenames.

> Having done this, the directory structure was generated. Now, we can add
> all the files:
> 
> $ find . -type f | grep -v \/CVS\/ | tr \\n \\0 | xargs -0 -n 10 cvs add --

Similarly,

$ find . -type d -name CVS -prune -o -type f -print0 | xargs -0 -n 10
cvs add --

> For all of this, there is one simple rule: Use at your own risk!

Ditto.

Michael


Reply via email to