Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am unable to get the Mingw tar to work with compress files. It does not filter through the proper compression utility. However, tar will work if I manually uncompress the file first. I have tried in both the MSYS shell and Windows cmd. Has anyone had this problem or is it a MinGW bug?

For example, this does not work:

C:\Users\home\Desktop>tar -tzf wdiff-0.5.tar.gz
tar: Cannot use compressed or remote archives
tar: Error is not recoverable: exiting now

C:\Users\home\Desktop>tar -t -Zgzip -f wdiff-0.5.tar.gz
tar: Cannot use compressed or remote archives
tar: Error is not recoverable: exiting now

C:\Users\home\Desktop>tar -tf wdiff-0.5.tar.gz
tar: Hmm, this doesn't look like a tar archive
tar: Skipping to next file header
tar: Only read 6732 bytes from archive wdiff-0.5.tar.gz
tar: Error is not recoverable: exiting now

However, this works:

gzip -d wdiff-0.5.tar.gz
tar -tf wdiff-0.5.tar
share|improve this question
    
MinGW tar -tvzf "file" seems to be working now... just needed another reboot? –  snmcdonald Mar 27 '10 at 16:55
add comment

2 Answers 2

up vote 1 down vote accepted

some tar implementations do not include compressing/decompressing. thats just .. how they are configured / compiled / linked. i would not describe that as a bug.

you could combine the 2 steps involved in untarring a compressed tarball with something like this:

 % zcat in.tar.gz | tar xf -

or

 % zcat in.tar.gz | tar tf -

(zcat is usually just aliased to 'gzip -cd')

share|improve this answer
    
that's what this looks like to me, too. @Shiftbit, you should check the documentation for your tar to see if there are any notes about stuff that isn't compiled into the MinGW version. –  quack quixote Mar 27 '10 at 11:57
add comment

I also had this problem. I used tar from cygwin to use -z switch in tar under Windows to resolve the issue.

share|improve this answer
    
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. –  Jens Erat Jun 22 at 19:54
    
The question is how to run "C:\Users\home\Desktop>c:\cygwin\bin\tar -tzf wdiff-0.5.tar.gz" without errors. The answer is to use tar from cygwin, i.e. to run smth like ""C:\Users\home\Desktop>c:\cygwin\bin\tar -tzf wdiff-0.5.tar.gz"" –  l0pan Jun 22 at 20:01
    
"I also have this problem" is a very strong indicator for a wrong use of answers. I slightly edited your answer to point out you actually have an answer to the question, and are not also searching for help. –  Jens Erat Jun 22 at 20:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.