I need to open a file that sadly is only available in the .tar.gz file format and I am using Windows 7. I can unzip the file using 7-zip but after that I still have a .tar file that I can't open in Windows.
Is there a way to open .tar.gz files on Windows?
10 Answers
You can use 7-zip to untar the .tar file as well.
- Right-click the file
- Select 7-zip -> Extract Here / Extract To
If you can, you can always use bash for windows and just do the regular
tar -xvzf <filename.tar.gz> 5 With a latest Windows 10 (1803+, or 10.0.17063+ for insiders) you can unpack a tar archive just like you do it in linux:
cmd.exe -> tar xf archive.tar.gz 7-zip should work for you. I believe you have to untar the .tar part of the file as a second step after unzipping the .gz part.
You also may need to check your 7-zip settings...
- Click Tools → Options
- Go to the “System” tab.
- Make sure “tar” and “gz” are checked off.
I use simple WinRAR extractor to extract .tar.gz file; simply do these steps,
- Start extracting the .tar.gz file with WinRAR, it will generate an Intermediate file.
- Rename that intermediate file as ".tar" and extract it again with WinRAR.
Now second time it will extract your all files/folders.
1The 7-zip package comes with a command-line tool called 7z.exe that can pipe to and from stdin (-si) & stdout (-so). So the following line will do the extractraction in one step with no intermediary file (-ttar tells 7-zip that we're piping in a tar stream).
PATH_TO_7ZIP\7z.exe x netlib-0.13.1.tar.gz -so | PATH_TO_7ZIP\7z.exe x -si -ttar 1 The problem is that when 7-zip uncompresses the tar file into a subdirectory, you have to go into the subdirectory in order to uncompress the tar file.
If you've tried to uncompress the subdirectory, it won't work of course.
There are two solutions here:
- Use 'extract here', not 'Extract files...'.
- Go into the subdirectory and extract from there.
Install total commander, it will deal with tar.gz files. You can just go inside such kind of file and copy it to the place you need. Extraction is done by TC in the background.
1I find Senthil Rajasekharan's TarTool.exe to be the simplest (includes the single dll from SharpZipLib).
- Version 1.0supports gzip
- Version 2.0 Beta adds bzip2
Paul has it correct, but in this case it's a 2-step process. First to remove the .gz(decompress the files) and second to remove the .tar(unpack the files).
2