tar frustration (was Re: relative pathname question!)

John Pope pope at vatican
Sat Aug 13 07:03:53 AEST 1988


In article <2858 at ttrdc.UUCP>, levy at ttrdc (Daniel R. Levy) writes:
>
>All this points up a "feature" of tar which I find frustrating:  if I want
>tar to tape-archive a large number of files randomly scattered all over the
>file system (such as for an incremental backup) I'm SOL because tar wants
>to be told either a directory to completely search or file names to archive,
>via the argument list.  "cpio" circumvents this problem, since I can feed it
>a list of files, but what if I don't WANT to use cpio?

To feed tar a list of files, I just keep the directories I want in a file called
"save_list" and do:

	tar cf /dev/rst8 `cat save_list` 

As a side note, SunOS has a handy "X" option to tar, which specifies a filename
containing files to exclude from the backup:

	tar cfX /dev/rst8 exclude_list `cat save_list` 

This lets me back up everything in /usr/foo, but exclude the subdirectory
/usr/foo/bar, for example.
-- 
-- 
John Pope
	Sun Microsystems, Inc. 
		pope at sun.COM



More information about the Comp.unix.questions mailing list