This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tar zxvf won't work with Redhat generated compressed tar file

On 2015-04-20, Murthy Gandikota wrote:

> >> Then it looks like you have a DOUBLE-compressed file. That is, someone
> >> took a .tar.gz file, and ran THAT through gzip again (which seldom does
> >> anything except make a LARGER file - because the first round of
> >> compression removed any redundancy). Tar cannot read a
> >> double-compressed stream, but breaking things into two steps lets you
> >> get back to a single compressed stream, where the tar call then
> >> auto-decompresses because you weren't supplying an explicit 'z' the
> >> second time around. To prove it, try:
> >>
> >> gunzip <mytar.gz>mytar
> >> tar zxvf mytar
> >>
> >> and if it still untars with an explicit decompression, then you have
> >> proven that your original file was double-compressed. Also, if I'm
> >> right about double compression, then mytar.gz would likely be slightly
> >> larger than mytar (rather than the usual case of the .gz being
> >> noticeably smaller).
> >>
> >> --
> >> Eric Blake eblake redhat com +1-919-301-3266
> >> Libvirt virtualization library
> >>
> >
> > Yes, Sir. It did untar properly. So the problem is with the
> > server compressing during the download (I get the file from a
> > http server)?
> > Thanks a lot for your help

> It would be doubly nice if cygwin handled it ;-) It seems gunzip
> had no problem recognizing the file as double compressed.
> Thanks all for the help.

I think you misunderstand.  Gunzip decompresses once.  As Eric
wrote, tar recognizes compressed files and will decompress them
automatically even without specifying a compression flag such as
'z'.  The second decompression is done by tar, not by gunzip.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]