[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with gz files



On Friday 23 June 2006 08:47, Chuck Payne wrote:
> Lothar Braun wrote:
> > On Fri, 2006-06-23 at 02:10 -0400, Chuck Payne wrote:
> >> hi all,
> >>
> >> I need to pull out one file out of gzip file. Can someone explain to me
> >> how.
> >
> > Use gunzip to do that:
> >
> > $ gunzip filename.gz
> >
> > -- Lothar
>
> Sorry, what I am wanting to do is pull a file out that gzip
>
> file x extracted from mygzip.gz
>
> That what I need to know, I don't want to extract the whole file because
> it too large.
>
> Payne
I think you have misunderstood .gz files.  filename.gz is a packed version
of one file.  If that file is say a TAR file, then it can contain multiple 
files, but the gz just contains one file.  If the original is a gziped tar 
file then you can extract one file using tar.  So if you have a gziped tar
file called large.tgz which contains amongst other things a file called fred
which you wish to extract you can say:-

tar xzvf large.tgz fred

If you do not have a gziped tar file then you need to tell us more about
the file and what you want to extract.

David



Reply to: