Extract file from tar home/

Robert Nichols rnicholsNOSPAM at comcast.net
Tue Jun 8 21:31:00 UTC 2010


On 06/08/2010 03:50 PM, Aaron Konstam wrote:
> On Tue, 2010-06-08 at 10:16 -0430, Patrick O'Callaghan wrote:
>>
>>>   You man have
>>> to say:
>>> tar xvzf bobg.tar.gz ./bobg/foo or maybe foo is not at the top of
>> the
>>> directory.
>>
>> Any Unix/Linux app that manipulates files clearly has to refer to them
>> with pathnames. It hardly seems necessary to point it out every time.
>> In
>> fact it would be extraordinary if it wasn't the case.
>>
>>> tar tvzf bobg.tar.gz will tell you that. Also you left out the z
>> option
>>> that you need to unzip.
>>
>> My point is that you *don't* need the z option. tar understands it
>> anyway (this is a feature from a year or two ago). Try it.
>>
>> poc
> Again when you are right you are right. I never noticed that the z in
> tar is optional. Thanks, I learned something.

Don't forget about it completely.  You still need the "z" option if tar
is reading gzip-ed input from stdin or from something other than an
ordinary file.  gzip needs to be able to read the input from the
beginning, even though tar has already read part of it to determine
that it is compressed.  Same goes for the "j" and "J" options.

-- 
Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.



More information about the users mailing list