[comp.sys.sgi] tar not working as advertised

HCART@VAX.OXFORD.AC.UK (09/19/90)

    I am backing up using tar(1) on a 3130.  If I give specific files
to be backed up, everything functions fine.  But if, to back up all
files changed in the last week, I use

  find / -local ! -type d -mtime -7 -type f -print | tar ca-

as shown in TFM, nothing is written to tape.

    The find(1) instruction on its own is OK, as

  find / -local ! -type d -mtime -7 -type f -print > backuplist

works.  But then

  cat backuplist | tar ca-

still doesn't work, even though backuplist has hundreds of entries.

    What am I doing wrong?  All advice appreciated...

    Hugh Cartwright.  Physical Chemistry,  Oxford.

moss@brl.mil (Gary S. Moss (VLD/VMB) <moss>) (09/20/90)

In article <9009191022.aa05623@VGR.BRL.MIL>, HCART@VAX.OXFORD.AC.UK writes:
|>   find / -local ! -type d -mtime -7 -type f -print | tar ca-
|> 
|> as shown in TFM, nothing is written to tape.
No, the tar command doesn't take the '-' (meaning read STDIN) as a key
letter, but as an argument to the 'f' key, try "tar caf -".  Note, the
space after the 'f', I believe it is mandatory.

RTFM carefully,
-Gary

jayavant@hpfcdj.HP.COM (Rajeev Jayavant) (09/21/90)

/ hpfcdj:comp.sys.sgi / HCART@VAX.OXFORD.AC.UK /  8:36 am  Sep 19, 1990 /

[text deleted]
    The find(1) instruction on its own is OK, as

  find / -local ! -type d -mtime -7 -type f -print > backuplist

works.  But then

  cat backuplist | tar ca-

still doesn't work, even though backuplist has hundreds of entries.

    What am I doing wrong?  All advice appreciated...

    Hugh Cartwright.  Physical Chemistry,  Oxford.
----------
According to the man page, there should be a space between the ca and
the -, i.e.:  cat backuplist | tar ca -

The IRIX version of tar is the only one I've used that reads filenames
from standard input.  Certainly seems to make more sense than the
standard "tar ca `cat backuplist`" when backuplist contains a very
large number of files.
							Rajeev
-------------------------------------------------------------------------------
Rajeev Jayavant (rajeev@hpfcla.hp.com)	      "Excuse me, I've lost my marbles"
Hewlett Packard - Graphics Technology Division        - P. Opus, [Bloom County]