To view our product collection visit our digital library Digital Library

To view our product collection visit our digital library Digital Library

How to Extract Unzip tar.gz Files: Step-by-Step Windows and Linux Guide

how to unzip tar.gz

If you want to see the progress of the compression, you can use the -v option, which makes the tar command more verbose and prints the names of the files being added to the archive. If you don’t want the directory structure in the tar file to be recreated on your hard drive, use the –strip-components option. Files from the ignored directories are still extracted, but the directory structure is not replicated on your hard drive.

how to unzip tar.gz

What is a Tar.gz File?

Choose the appropriate location and click Select to extract the file to that location. Most Linux distributions ship with a preinstalled archive manager. Decompressing TAR and TAR.GZ files is only a matter of few clicks using the GUI. The command extracts files to a new directory called example1, which is located in the current directory. You can open most .tar.gz files using the tar command built in to Linux, macOS, and Windows 10. If you’re not comfortable with the terminal or command line, third-party tools such as 7-Zip offer a more user-friendly alternative.

Extract Files from a .tar.gz via GUI

If the file is a bzip2-compressed file, replace the “z” in the above commands with a “j”. You can notice in the above image that the archive files are extracted in the same working directory. This compression is lossless – that means no data is lost during the compression process, and the original files can be fully restored an overview of 15 popular coding games for adults upon extraction. The -v option makes the tar command more verbose and prints the details of each file, such as permissions, owner, size, and modification date. If you only want to see the file names, you can omit the -v option. If you want to unzip the files to a different folder, click on the Extract To option.

  1. To extract a single file, provide the path and the name of the file.
  2. The tar command also provides support for extracting only specific files or directories from a .tar.gz file.
  3. Thankfully, you don’t need to be a 1960s computer technician to use and extract .tar files – nor do modern .tar files even have anything to do with old computers.
  4. It may sound like a silly mistake, but it’s surprisingly common in situations where users directly rename files and their extensions (such as .tar and .gz) in the process.

How to Extract or Unzip a tar.gz File in Linux

Tar files date all the way back to 1979 when the tar command was created to allow system administrators to archive files onto tape. Forty years later we are still using the tar command to extract tar files on to our hard drives. It allows users to create, view, and extract files in various archive formats, including its native .RAR format as well as other common formats like .ZIP, .7z, ISO, .TAR, and more. Before extracting a tar.gz file, you ideas and forecasts on cryptocurrencies may want to see what files and directories it contains.

We’ve been recommending this app for years, and it’s one of the first things that we install whenever reinstalling Windows. But with .zip being the easier of the two to use, why use .tar in the first place? The next section shows how .tar comes with a few extra features that make it the better compression format for certain files and applications.

As we cover more in the next section, you can verify file names by listing contents with the tar -tf filename.tar.gz command. For sending and storing, both .zip and .tar.gz files allows you to send relatively large packages as a single file. However, there are some pretty major differences when it comes to accessing data within the files and the compression efficiency. A “.tar” file is a collection of files compressed into a single file or archive.

Otherwise, keep reading to learn how to unzip .tar.gz files in Linux, macOS, and Windows. It’s the same as the archive creation command we used above, except the -x switch replaces the -c switch. This specifies you want to extract an archive instead of create one. These files can be used in incremental backup strategies – where only new or modified files are added to the archive.

I had a lot of fun, three years ago or so, running a bunch of tests with different compression methods, and it was very enlightening to see how various files took to compression. You’ll probably have to install the “other” tar (whatever that may be on your system) manually. Now the file “four” is extracted to a new directory called “bar.” If “bar” already exists, then “four” is placed inside the existing directory. If you’ve received a tarball from a friend or a software project, you can extract it in either your GUI desktop or in a shell. In a GUI, right-click the archive you want to extract and select “Extract.”

This error usually occurs when a .tar has been saved as a .gz despite having never been compressed using the forex crm for brokerages and exchanges gzip utility. It may sound like a silly mistake, but it’s surprisingly common in situations where users directly rename files and their extensions (such as .tar and .gz) in the process. As we see later, different compression utilities may require different methods for extracting and unzipping files. Though we mostly focus on .tar.gz files, check out the end of the article for some quick tips on extracting .tar files in other formats. On Windows, the easiest way to handle .tar files is to install the LGPL open source 7-Zip utility.