Creating a .tar.gz file with 7-Zip

7-Zip - Creating a tar.gz file - Part 1I'm in the process of bringing my MyMiniCity Dynamic Signature script to SourceForge. While creating the download archives, I came across a very simple and yet very interesting question:

How do I create a ".tar.gz" file using 7-Zip on Windows?

On Linux, I would simply run:

tar cfz archive.tar.gz folder

When using 7-Zip on Windows, this process is a little bit more complicated.

As a GZIP compressed archive can contain only one file, 7-Zip won't offer you GZIP compression if you try to compress a folder or multiple files at once. When you choose TAR, you can't select any compression algorithm.

7-Zip - Creating a tar.gz file - Part 2The trick is, that you have to create a TAR archive first. You can then put that single TAR file into 7-Zip and it will finally offer you the ability to compress that file using GZIP.

The result is an archive with the .tar.gz extension which is exactly what you wanted to do.

That's another example how something that needs several mouse clicks on Windows needs a single line on a Linux shell.

Comments

Just a random user's picture

On windows I'm using IZArc

On windows I'm using IZArc (http://izarc.org) which is quite good and free, too but you know that already, I believe :).

Chi-Yu's picture

I'm actually happy with

I'm actually happy with 7-Zip. It integrates into the context menu, supports all the formats that I use and it's free.