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. Some common examples include .tar.bz2 (bzip2), .tar.br (Brotli), and .tar.zst (zstd), among many others. Most of the time, you will get your hands on a compressed package that needs extracting. On Linux, there are multiple ways to unzip compressed archives.
Is .tar.gz more efficient than .zip?
- You can also choose the destination directory where you want to extract the files.
- Since .tar.gz compresses multiple files all at once, it can take advantage of similarities between individual files to save on space.
- In this article, you learned how to extract or unzip tar.gz files in Linux using the tar command and other tools.
It offers AES-256 encryption to protect sensitive data within archives. Users can utilize the 7-zip command-line interface for automated & scripted extraction tasks. 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. 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.
How to Unzip .tar.gz in Linux using tar
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. To extract a tar.gz file using an archive manager, you need to open the file with the archive manager and then click on the Extract button. You can also select the files and directories you want to extract and the destination directory where you want to extract them. People new to the .tar format usually equate it to a .zip archive, but a tar archive is not compressed.
If you want to unzip the files to a different folder, click on the Extract To option. Choose the appropriate location and click Select to extract the file to that location. Ubuntu LTS (Long-Term Support) versions, known for their stability and extended support periods, are typically released every two bitcoin rally falters just short of $50000 as investors take profit by reuters years in April. These are popular for organizations and users who require a reliable and well-supported Ubuntu operating system. Perhaps you might also be interested in learning how to unzip files in Linux.
These files can be used in incremental backup strategies – where only new or modified files are added to the archive. Gzip compression reduces the overall file size, which makes it more efficient for distribution, backup, and storage purposes. It just bundles files & directories together while preserving their file structure and metadata. This means it takes all the specified files and puts them together into one container.
The contents of the .TGZ file will now be extracted in a separate folder which you can now access using Explorer. Locate the compressed archive file and right-click on it to bring up the menu. 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. If you’re familiar with packages in Linux, you may have come across a TAR or a TAR.GZ file. While experienced users know what is a TAR file and how to extract it, Linux newbies might face some difficulties in figuring out what to do with it.
Extracting .tar.gz Files for Windows
If you want to see the progress of the extraction, you can use the -v option, which makes the tar command more verbose and prints the names of the files being extracted. To unzip the .tar.gz files, you’ll need to use specific commands and tools depending on your operating system. Let’s explore the extraction process for both Linux & Windows platforms.
How to «Unzip» or Extract a Tar.gz File on Windows
As an independent site, producing content takes a lot of work and dedication, and because of those using adblockers and AI, advertising revenue is falling fast. Unlike many other sites, there is no paywall blocking readers here, so you can see why your help is needed. On Windows 10, to use tar on Linux, you need to install the Windows Subsystem for Linux (WSL) and a distro like Ubuntu from the Microsoft Store.
He has also been a Windows Central contributor for nearly a decade. 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 how to buy and sell futures combined experience in technology. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Once you’ve selected the right file, you’ll see «7-Zip File Manager» show up in the select app dialog.
You can also use The Unarchiver, which is a free tool for managing how to buy on coinmarketcap archives, functions just like the Archive Utility, and supports .rar files as well. Just replace the -x with a -c to «Create,» though I find it easier to remember by «Compress,» even though that’s -z’s job. To access the Windows command line, search for “command prompt” or “cmd” in the search bar. Right-click the first result and select the “Run as administrator” option.
If you specify a directory, tar will recursively archive all the files and subdirectories in that directory. You can notice in the above image that the archive files are extracted in the same working directory. The command extracts files to a new directory called example1, which is located in the current directory. For those that don’t like using a terminal, you’ll be delighted to hear that macOS can open tar and tar.gz files by default with the Archive Utility.
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. Technical details aside, all you need to remember is that .zip files are more accessible but less space-efficient, while .tar files are less accessible but more space-efficient. As a result, one isn’t necessarily better than the other — it’s all a matter of application.
If you want to create your own tar.gz file, you can use the tar command with the -c option, which tells tar to create a new archive. You also need to use the -z option to compress the archive with gzip, and the -f option to specify the file name. 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. DEB is the native and most common package format Ubuntu and other Debian-based Linux distributions use. It contains compiled binaries, libraries, configuration files, and metadata required to install and manage software on a Ubuntu system.
Another common cause of errors is case sensitivity, where Linux treats “FILE” and “file” as two separate entities. This error occurs when trying to extract specific files or directories from a .tar.gz file using tar. 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.
