This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: tar zxvf won't work with Redhat generated compressed tar file
- From: Murthy Gandikota <murthy64 at hotmail dot com>
- To: Eric Blake <eblake at redhat dot com>, "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Mon, 20 Apr 2015 22:00:10 +0000
- Subject: RE: tar zxvf won't work with Redhat generated compressed tar file
- Authentication-results: sourceware.org; auth=none
- References: <COL130-W80F61D41DBC766A5C40206C2E00 at phx dot gbl>,<969800560 dot 20150420222609 at yandex dot ru> <COL130-W78804B6BA04135A92CC2FAC2E00 at phx dot gbl>,<509379965 dot 20150420235036 at yandex dot ru> <COL130-W65B445CB84F1010DEEDA6EC2E00 at phx dot gbl>,<55356CBB dot 9030601 at redhat dot com>
----------------------------------------
> Date: Mon, 20 Apr 2015 15:16:43 -0600
> From: eblake@redhat.com
> To: cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>
> On 04/20/2015 03:08 PM, Murthy Gandikota wrote:
>
>>>
>>>> $ tar xvf mytar.gz
>>>> tar: This does not look like a tar archive
>>>> tar: Skipping to next header
>>>> tar: Exiting with failure status due to previous errors
>>>
>>> Then what makes you think it is actually a tar archive?
>>> What
>>>
>>> gunzip> mytar < mytar.gz; file mytar
>>>
>>> says?
>>>
>
>> Sorry, didn't notice the top-posting.... here is the output to the command
>>
>> mytar: gzip compressed data, last modified: Tue Mar 24 03:50:58 2015, from Unix
>
> 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 http://libvirt.org
>
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
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple