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.

Is there a way to gunzip a file that isn't ending with a .zip even though I know for a fact the file is indeed a zip?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

There are two issues here. gunzip can be used to decompress any single file compressed with gzip regardless of the file's extension.

gunzip < file > output file

A zip file (one containing multiple compressed files) is incompatible with gunzip. For this kind of file, you need to use unzip. unzip can decompress any zip file (not gzip) regardless of extension.

http://www.info-zip.org/UnZip.html

share|improve this answer

gunzip works with gzip (".gz") files, not zip (".zip") files. For zip files, you need to use the unzip command.

Also, the extension doesn't matter in linux, and is simply for human-reference. gunzip is complaining because the markers inside the file you are trying to decompress indicate that the file is not a LZ77 file, which is what gunzip is designed to handle. It is either corrupt, or you need a different tool to decompress it. If it's really a zip file, then you need the tool I described above.

share|improve this answer

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.