How to Unzip or Extract tar gz Files on Windows

how to unzip a tar gz file

Now the file “four” is extracted to a new directory called “bar.” If “bar” already exists, then “four” is placed inside the existing directory. Ubuntu LTS (Long-Term Support) versions, known for their stability and extended support periods, are typically released every two years in April. These are popular for organizations and users who require a reliable and well-supported Ubuntu operating system. The name “Tar” stands for “Tape Archiver” because it was used to place data on storage tapes when tar was invented. The tar program takes one or more files and “wraps” them into a self-contained file.

Alternatively, you can also specify a source and destination file path when using the tar utility. 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. Where .zip files consist of many individually compressed files, .tar files are compressed as a single package, leaving its files uncompressed. In other words, .zip files are a collection of compressed files, while .tar files are a compressed collection of files.

For example, it goes without saying, that it is inadvisable to untar the whole large archive if you need for example to extract only a dingle file or a directory from it. 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. As the files are extracted, they are listed in the terminal window. Any remotely modern version of tar should auto-detect that the archive is gzipped, and add “z” for you. It also integrates with the Windows Explorer context menu, which enables users to create and extract archives directly from the right-click menu.

The extraction method is precisely the same for tar files that have compression, such as.tar.gz,.tar.bz2, and others. A “.tar” file is a collection of files compressed into a single file or archive. Short for “Tape ARchive,” the name “TAR” is a throwback to when files were stored on magnetic tape drives. In the shell, you can add a file or directory to a tar archive as long as it is not compressed. If your archive has been compressed, you must uncompress it, but you do not need to unarchive it. Perhaps you might best crypto exchange review also be interested in learning how to unzip files in Linux.

Funtoo Linux Project Being Discontinued?

Snaps were developed by Canonical, the company behind Ubuntu, to package and distribute software focusing on security, sandboxing, and ease of installation and updates. They ledger live were officially introduced in Ubuntu 16.04 LTS, released in April 2016. Ubuntu Core is a minimalistic and immutable version explicitly designed for the Internet of Things (IoT) and embedded systems. It is based on Ubuntu and tailored for use in scenarios where reliability, security, and ease of maintenance are critical, relying on the Snap package and atomic transactional updates. Looking in our Documents/Songs directory we’ll see the Guitar Songs directory has been created. You may also be interested in learning about the best WinZip alternatives to compress files.

  1. Generally speaking, a collection of files archived and compressed as a .tar.gz are more space-efficient (i.e., smaller) than the same collection compressed as a .zip.
  2. Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication.
  3. This error occurs if you try to decompress a file without specifying a decompression utility, specifically -z for gzip.

The tar command also provides support for extracting only specific files or directories from a .tar.gz file. Simply add a space-separated list of the files you want to extract. From videos to entire software packages, many files are compressed and stored using the .tar.gz format. While extracting a .tar.gz file isn’t quite as easy as unzipping a .zip, it’s still pretty straightforward. Most Linux and BSD desktops come with a graphical archive utility.

If you want learn to trade reviews a specific file, you can drill down into the folder, or you can simply click the “Extract” button and choose a location to put all the files. This error usually occurs when a .tar has been saved as a .gz despite having never been compressed using the 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. Unlike Windows’ convenient graphical user interface (GUI) for unzipping .zip files, you need to use the tar utility through the command line.

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. It’s easy to get confused when navigating between .tar, .tar.gz, and .gz – not to mention zipping and unzipping them. Here are a few frequently asked questions we commonly hear from users working with .tar.gz files.

And of course this is possible with the Linux tar command, but firstly you need to check what is there inside the tarball without unpacking it. We can see that the Ukulele Songs directory contains directories called Random Songs, Ramones and Possibles. The author combines expert insights with user-centric guidance, rigorously researching and testing to ensure you receive trustworthy, easy-to-follow tech guides. Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade.

If the command line isn’t your thing, there are plenty of user-friendly tools available to unzip tar.gz files. 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. 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. This is good and pretty comprehensive, Seth.One thing to point out is that, since .jpg and .png files are already compressed, you won’t get much compression with gzip.

Mauro has over 15 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 21 years of combined experience in technology. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Once you’ve done this successfully, you’ll notice that the icon for tar.gz files will change to a 7-Zip icon.

tar: Archive is compressed. Use -z option

You can create your own compressed .tar files using compression utilities such as gzip. Gzip is one of the most popular and available options, especially since it comes built in to most Linux distributions and macOS. Just like the more familiar .zip files, .tar files compress large files into a single package, making it easier to store and send them through email, servers, and so on. As a result, it has become a common file extension for many open-source software packages and other resources. On Windows, the easiest way to handle .tar files is to install the LGPL open source 7-Zip utility.

View a List of Files within an Archive

how to unzip a tar gz file

Here’s how to extract — or untar — the contents of a tar file, also known as a tarball. A file using .tar.gz format is a file that has been created using the Unix-based archival application tar and then compressed using the gzip compression. These files are often referred to as “tarballs.” While you can find them with a double extension (.tar.gz), the extension can also be shortened to .tgz or .gz.

Its name implies it’s a zip utility, but it also works with tar archives, and even provides commands for the cmd command-line interface. People new to the tar format usually equate it to a .zip file, but a tar archive is notably not compressed. The tar format only creates a container for files, but the files can be compressed with separate utilities. Common compressions applied to a .tar file are Gzip, bzip2, and xz. That’s why you rarely see just a .tar file and more commonly encounter .tar.gz or .tgz files. You’ll want to replace “tarfile” with the path to the tar.gz file that you’re trying to extract.

Extracting .tar.gz Files for Windows

However, there are also many third-party tools you can install for a more user-friendly experience. This command extracts (-x) the file (-f) specified (in this case, filename.tar.gz) to the current directory. Note that this command also works with other common compression formats such as .tar.bz2. The Dolphin file manager offers a feature to autodetect whether the files extracted from an archive are contained in a directory or if a new directory needs to be created for them. I use this option so that when I extract files from a tarbomb, they remain tidy and contained.

Extracting Files from Tar Files

One file is called ukulele_songs.tar.gz , the other is called guitar_songs.tar.bz2 . 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. Whether you prefer command-line tools or graphical file archivers, the extraction process is pretty simple.

Leave a Comment

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