#!/bin/csh -f # savefiles - K. Inscoe (kevin@inscoe.org) - June 21, 2004 # # This script calls savehdr.pl for the current subdirectory. It also creates a tar # file of the current directory tree. Use restfiles to restore this collection on the # remote host after copying the $saveset files. To use this script first change # directory to the base directory of what you wish to copy to the remote host. # # Get saveset name and directory if ( $#argv < 2 ) then echo "Usage: savefiles saveset savesetdir" echo " " echo "e.g.: savefiles hiro /root" echo " " exit 1 endif set saveset = $argv[1] set savesetdir = $argv[2] find . -exec /usr/local/bin/savehdr.pl {} $savesetdir/$saveset.hdr \; tar cvf $savesetdir/$saveset.tar . ls -l $savesetdir/$saveset.*