Sign in to follow this  
Simian Man

Can gzip open Windows .zip files?

Recommended Posts

The thread name really says it all. I am wondering because I want to put some source code on my website so anyone can download it, but it would be a pain for me to put it in .tar.gz

Share this post


Link to post
Share on other sites
gzip can't open normal zip files, but I think pretty much every linux distribution around comes with zip support too. At least all the ones I'v used. not sure about Mac though.

Share this post


Link to post
Share on other sites
Quote:
Original post by Simian Man
The thread name really says it all. I am wondering because I want to put some source code on my website so anyone can download it, but it would be a pain for me to put it in .tar.gz


It would be a pain..?

Assuming your game is just sitting in one directory (called 'game' for example), I don't see what is such a big deal about typing,

tar zcf MyGame.tar.gz game

Which will create a gzipped tar file containing everything in the game directory.

Share this post


Link to post
Share on other sites
Well you see, It is the code that I want to put up. It is in about 20 files on my Windows machine. To put it in a tarball, I would have to burn it to a CD, take it to school, put it on my school drive, secure shell to a Linux machine (via Putty), put it all in my Linux account, create the tar ball, then do the previous again in reverse.

That's why it would be a pain (compared to using winzip), but since the response was pretty much lukewarm to Linux users being able to unzip it, I decided to do it anyway.

Share this post


Link to post
Share on other sites
Quote:
Original post by j0seph
Simple answer: Yes. I used it several times. 'gunzip -S zip filename.zip' should do the trick.


From the gunzip man-page:
Quote:

Files created by zip can be uncompressed by gzip only if they have a
single member compressed with the 'deflation' method. This feature is
only intended to help conversion of tar.zip files to the tar.gz format.
To extract a zip file with a single member, use a command like gunzip
<foo.zip or gunzip -S .zip foo.zip. To extract zip files with several
members, use unzip instead of gunzip.

Share this post


Link to post
Share on other sites
Will winzip not gzip files? I swear i've extracted them in win xp before. of course, i wouldn't be shocked to see windows doesn't ship with the ability to extract files compressed in an open source format.

Share this post


Link to post
Share on other sites
Sign in to follow this