Skip to content

Unzip .tar.gz files in Windows

G24th November 2016

CNo Comments

TWindows

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.

   

Comments:

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.