Extract file from tar home/

Aaron Konstam akonstam at sbcglobal.net
Tue Jun 8 13:21:37 UTC 2010


On Mon, 2010-06-07 at 17:58 -0400, Bob Goodwin wrote: 
> On 07/06/10 17:52, Luc MAIGNAN wrote:
> > tar -xzvf bobg.tar.gz file_to_extract
> >
> > "man tar" is your friend...
> >
> > Le 07/06/10 23:48, Bob Goodwin a écrit :
> >    
> >>       I have /home/bobg/ tar'd to "bobg.tar.gz." Can I extract individual
> >>       files or directories without unzipping the entire 17 gigs?
> >>
> >>       Bob
> >>
> >>       --
> >>      
> 
>     Yes I've been working with "man tar" and Google so thought I would
>     come to the place of last resort.
> 
>     AS I suspected it probably has to be unzipped first but that's ok,
>     just a thought.
> 
>     Thanks.
> 
>     Bob
It does not need to unzipped first. Let say you have a file in your home
directory called myfile. Then you can extract it by:
tar xzf bobg,tar.gz ./bobg/myfile

You can find out what to use to refer to the file by running:
tar tvzf bobg.tar.gz |grep myfile
--
=======================================================================
Dishonor will not trouble me, once I am dead. -- Euripides
=======================================================================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam at sbcglobal.net



More information about the users mailing list