Skip to content

Dear Internet Explorer user: Your browser is no longer supported

Please switch to a modern browser such as Microsoft Edge, Mozilla Firefox or Google Chrome to view this website's content.

Unzip .tar.gz files in Windows

Use this one-liner in the command prompt to extract the contents of .tar.gz files on Microsoft Windows machines.

Yes, it is possible to easily unzip tarballs in Windows! In order for the one-liner to work, you will first need to install 7-Zip, which is available free from the 7-Zip website. Note the location of 7za.exe on your Windows machine once installed.

Then open up the Command Prompt (type cmd into the search bar/Cortana) and cd to the directory where you want the file unzipped to.

The code is as follows; simply change the parameters to suit your circumstances.

c:\path\to\7za\7za.exe x c:\path\to\target\file.tar.gz -so | c:\path\to\7za\7za.exe x -si -ttar

The entire contents of the file should easily unzip.



No comments have yet been submitted. Be the first!

Have Your Say

The following HTML is permitted:
<a href="" title=""> <b> <blockquote cite=""> <code> <em> <i> <q cite=""> <strike> <strong>

Comments will be published subject to the Editorial Policy.