Glam Prestige Journal

Bright entertainment trends with youth appeal.

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?

1

2 Answers

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.

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy