Search:     Advanced search

How to extract gzip and tar files on the command line

Article ID: 124
Last updated: 03 Jun, 2014
Views: 204087

Command line support for WinZip is available from the WinZip web site.

Starting with version 4.0, the WinZip Command Line Add-On can be used to unzip any of the archive types that are supported by WinZip. Additionally, version 4.0 can create LHA files. For simple archive types, you would use the same type of unzip command that would be used with Zip files. For example, if you need to extract the contents of a tar file or a gzip file, your commands would look like this:

wzunzip file.tar [PATH]

wzunzip -d file.gz [PATH]

If you need to extract the contents of a complex archive, such as a tar.gz or tgz file (each being an archive with a tar file inside), you would need two commands:

wzunzip file.tar.gz [PATH]
wzunzip file.tar [PATH]


Earlier versions of the add-on only support creating and unzipping Zip files (.zip or .zipx). If needed, command line tools for gzip and tar files are available in a collection of Win32 command line GNU utilities and are also available from the gzip home page.

Here is an example of how to extract the contents of a gzip file:

gzip -d file.gz

Here is an example of how to extract the contents of a tar file:

tar xvf file.tar

Here are examples of how to extract the contents of a tar.gz and a tgz file:

gzip -d < file.tar.gz | tar xvf -
gzip -d < file.tgz | tar xvf -

Another resource is the GNU Tar home page.

If you have any questions about this information please email Technical Support.

This article was:   Helpful | Not Helpful
Also listed in
folder WinZip Command Line Add-On

Prev   Next
WinZip     A quick example of how to unzip with WinZip

RSS