Shawn Anderson writes:
> BlankAm trying to figure out the best way to transport full directory
> hierarchies into the Attic.  If I were to do the following::
> 
> 
> 
> $:  rm -rf modulename [except CVS dirs]
> 
> $:  cvs -rm -rf modulename
> 
> $:  cvs ci -m "removed directory"  modulename

How about something like this? (from a working directory):

  find . -type f -print | grep -v CVS |\
       while read f; do rm "$f"; cvs remove "$f"; done
  find . -type d -print | grep -v CVS | sort -r |\
       while read f; do cvs remove "$f"; done
  cvs commit -m"Move everything in directory X to Attic"

(the "sort -r" is a hack to get it to place subdirectories before their
parents in the list. Quotes are necessary around the "$f" in case you
have any directories filenames with spaces in them.)

/bin/sh is your friend (and /bin/bash is your co-conspirator).

Reply via email to