From: Brandon S. Allbery (bsa@kf8nh.wariat.org)
Date: 08/17/93


From: bsa@kf8nh.wariat.org (Brandon S. Allbery)
Subject: Re: tar & mt
Date: Tue, 17 Aug 1993 23:28:18 GMT

In article <4gQID2q00VR509B4si@andrew.cmu.edu> "Brian E. Gallew" <geek+@CMU.EDU> writes:
>dclemmer%anl433.uucp@Germany.EU.net (David Clemmer) writes:
>> ok... how would you specify which you wanted when restoring from that tape?
>> i mean, you can't exactly say 'tar xvf /dev/rmt0/file1' or something equally
>> silly...
>Actually, RTFM will show
>tar xvf /dev/rmt0 path1 path2 path3
>where pathX is the full pathname of the file of interest.

Wrong answer. He's talking about separate tapefiles; tar won't read past the
end of the first tapefile.

The answer is:
        mt -f /dev/rmt0 fsf
        tar xvf /dev/rmt0 ...

>> btw, in checking my back-up (which i did by saying: tar cvf - * |gzip -cv >
>> /dev/rmt0), i found that zcat couldn't deal with the tape... ie: i couldn't do
>> zcat /dev/rmt0 |tar tvf -
>> i had to do:
>> cat /dev/rmt0 |zcat |tar tvf -
>> this make sense to anyone?
>Yeah, zcat isn't truly intelligent. Try `zcat < /dev/rmt0 | tar tvf -`.
>Of course, if you are at all familiar with GNU-tar, then you would use
>`tar tvfz /dev/rmt0`.

If he's got the tar from SLS 1.02 or earlier, that won't work. :-(

As for why gzip won't read the tape directly: it probably rejects anything
that isn't an ordinary file or a pipe. In the case of tapes, the tape drive
would probably reject any read attempts anyway unless gzip reads in multiples
of 512 bytes. (Of course, gzip undoubtedly uses stdio so this isn't likely to
be a problem.)

++Brandon

-- 
Brandon S. Allbery         kf8nh@kf8nh.ampr.org          bsa@kf8nh.wariat.org