tar frustration (was Re: relative pathname question!)
Paul Lew
lew at gsg.UUCP
Thu Aug 11 19:59:36 AEST 1988
>From article <2858 at ttrdc.UUCP>, by levy at ttrdc.UUCP (Daniel R. Levy):
>
> 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?
Check with public domain tar posted to comp.sources.unix volumn 12. There is
a flag 'T' which will take filenames from a file. I used it to save sources
files like:
find $src -print | sed \
-e '/\.o$/d' \
-e '/\.a$/d' \
-e '/~$/d' \
-e '/\/core$/d' \
-e '/\/a\.out$/d' | tar -c -T -
It works out great. If $src is an absolute pathname, this tar will remove
the leading /s when writing to tape.
--
Paul Lew {oliveb,harvard,decvax}!gsg!lew (UUCP)
General Systems Group, 5 Manor Parkway, Salem, NH 03079 (603) 893-1000
More information about the Comp.unix.wizards
mailing list