Xref: utzoo comp.unix.questions:8726 comp.unix.wizards:10383 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!mit-eddie!ll-xn!ames!oliveb!sun!pope@vatican From: pope@vatican (John Pope) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: tar frustration (was Re: relative pathname question!) Message-ID: <64026@sun.uucp> Date: 12 Aug 88 21:03:53 GMT References: <1670003@hpcilzb.HP.COM> <5762@super.upenn.edu> <1414@valhalla.ee.rochester.edu> <2858@ttrdc.UUCP> Sender: news@sun.uucp Reply-To: pope@vatican (John Pope) Followup-To: comp.unix.questions Organization: Sun Microsystems, Inc. Lines: 26 In-reply-to: levy@ttrdc.UUCP (Daniel R. Levy) In article <2858@ttrdc.UUCP>, levy@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@sun.COM