Delice Gourmand

Search
Close this search box.

How to Zip and Unzip or Extract TAR and TAR GZ Files

how to unzip a tar.gz file

Choose the appropriate location and click Select to extract the file to that location. Click on the Extract Here option to unzip the content of the file. The system will extract all the files to your current directory by default. For TAR.GZ files, you will have to unzip the compressed archive to TAR, and then further extract the TAR file using 7-Zip. DEB is the native and most common package format Ubuntu and other Debian-based Linux distributions use.

You just need to use the appropriate tar command line options. Where commands have little (if any) room for typos or omissions, many common errors are the result of small mistakes, misspellings, or incorrect formats. Thankfully, unless you’re somehow missing your tar or gzip utility, most common errors are very easy to fix.

After reading this article, you know how to extract or unzip .tar.gz file in Linux using different methods and tools. In this guide, you will learn how to extract or unzip .tar.gz files in Linux. You can easily unzip the resulting .tar.gz file with the decompress (-d) option.

  1. As we see later, different compression utilities may require different methods for extracting and unzipping files.
  2. The command extracts files to a new directory called example1, which is located in the current directory.
  3. Gzip compression uses a checksum to make sure data integrity.

Unzip Files with gunzip

Note that the path is wrapped in quotation marks because there are spaces in the path. Notice that we don’t need to use the -z option to list the files. We only need to add the -z option when we’re extracting files from a .tar.gz file. Likewise, we don’t need the -j option to list the files in a tar.bz2 file. If we list the files in the Download directory we will see that another directory called Guitar Songs has been created.

tar: Unrecognized archive format

This means it takes all the specified files and puts them together into one container. Then we’ll jump into the step-by-step process of unzipping on both Linux and Windows platforms. Once you’ve selected the right file, you’ll see “7-Zip File Manager” show up in the select app dialog.

Using third-party tools

Unlike Windows’ convenient graphical user interface (GUI) for unzipping .zip files, you need to use the tar utility through the command line. However, there are also many third-party tools you can install for a more user-friendly experience. Though gzip is the most common compression utility, it’s not the only one. As you might imagine, using a different compression utility on a .tar file will result in a different double extension.

how to unzip a tar.gz file

To extract a single file, provide the path and the name of the file. The -p (parents) option causes mkdir to create any parent directories that are required, ensuring the target directory is created. One file is called ukulele_songs.tar.gz , the other is called guitar_songs.tar.bz2 . Any remotely modern version of tar should auto-detect that the archive is gzipped, and add “z” for you.

Ubuntu is a Southern African philosophy and term originating from South Africa and Zimbabwe. Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 what traders should know before investing in icos years of experience. Once you choose the directory, click the Select button in the top right corner. Pureinfotech is independent online publication that makes Windows and apps easy to understand with clear, concise guides, advice, and news.

Some common examples include .tar.bz2 (bzip2), .tar.br (Brotli), and .tar.zst (zstd), among many others. Where most operating systems make it easy to extract and create .zip files, the same can’t really be said for .tar files — at least not in ways that are easy there is no reason to sell what will happen to bitcoin and ethereum to notice. Gzip compression uses a checksum to make sure data integrity. When you extract files from a .tar.gz archive, the checksum is automatically verified to detect & handle any potential data corruption. A GZ file is nothing but a file compressed using the gzip algorithm. You can use the official GNU gzip utility to extract the content of the compressed archive file.

We are skipping some arguments usually necessary to preserve permissions, which on Windows 10 are not required to access the files. Once you complete the steps, you will have all the files and folders extracted to the destination path you specified after a few moments. This guide will teach you the steps to use native tar commands on Windows 10 from Command Prompt and Ubuntu to extract the content of a .tar.gz file.

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. You can notice in the above image that the archive files are extracted in the same working directory. When the how to buy flow crypto in usa archive is extracted, these attributes are restored. That means they maintain their original characteristics. If you find difficulties working with command-line, know that you can also use a desktop app or online alternative to extract a [.inline-code]tar.gz[.inline-code] file.

WinRAR is a popular file compression & archive utility software. 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. You’ll encounter them frequently while using a Linux distribution like Ubuntu or even while using the terminal on macOS. Here’s how to extract — or untar — the contents of a tar file, also known as a tarball. This error usually occurs when a .tar has been saved as a .gz despite having never been compressed using the gzip utility.

Whether you prefer command-line tools or graphical file archivers, the extraction process is pretty simple. This compression is lossless – that means no data is lost during the compression process, and the original files can be fully restored upon extraction. The easiest way to open a tar.gz file on Windows is to install an excellent free utility called 7-Zip, which can handle tar.gz and just about any other file format. We’ve been recommending this app for years, and it’s one of the first things that we install whenever reinstalling Windows. You can choose which files to extract from the archive.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top