Tar.gz is a common format for Linux and UNIX, and several commands can be used to package file compression into tar.gz format However, this format is not uncommon in Windows, WinRAR, WinZip and other mainstream compression tools can be released, but not packaged generation. But tar.gz is often used on Linux servers, so many web developers who are accustomed to using Windows may encounter the hassle of this compression format. How to generate tar.gz compressed package in Windows system, search on the Internet except complex command line and open source software, there seems to be no other. Accidentally found "7-zip" This software can be very convenient to solve this problem. The steps are as follows:
First, download 7-zip, after installation directly in the file you want to package the right-click menu, there will be a 7-zip sub-menu bar, similar to WinRAR and WinZip that kind of right-click menu. Then choose "7-zip", "Add to Compressed Archives", in the pop-up window there is a "compressed format" option, there is no tar.gz format, it doesn't matter, there is a tar format, the first step is to first press into the TAR format.
Second, after successfully packaging the tar file, you may find that the tar package is the same size as the original file, which means that the tar itself is not compressed, but simply packaged into a single tar file. So you need to do a second step, and then in this tar file right-click, select "7-zip", "Add to the compressed file", this time the pop-up window to see "Compression format options", found that there are two more than just did not, including "gzip", yes, This step is to continue compressing the tar file into gzip. After selecting the "GZip" format, the final result is a new tar.gz format file.
After I test, compatible with a variety of software, uploaded to the server also no problem. The whole process of mouse flow, completely without knocking what command line.
The compressed file format and size are as follows: Now, get tar.gz done under windows! Description: After installing 7-zip 9.20, directly can choose GZIP format compressed into GZ format, without intermediate tar format, I personally tested has passed 7-zip 9.20 (win_32bit) 7-zip 9.20 (win_64bit) 7-zip 9.
How Windows compresses tar.gz formats