How to quickly extract .tar.gz file on Windows 10
A file using the .tar.gz format is a file created with a Unix-based archive application and then compressed using the gzip tool. These files are often called tarballs. Although you can find them with the extension.tar.gz, the file extension can also be shortened to .tgz or .gz.
Typically, tar files are commonly used by Ubuntu and macOS users for data storage and backup, but sometimes Windows 10 users may encounter these types of files and need to extract its contents.
Although you can use some third-party applications like 7-Zip and PeaZip, sometimes these applications may not work well with files created on other platforms and are very slow when extracting a bulk files.
Windows 10 includes native support for tar. You can use the Command Prompt to extract these files. In addition, you can even use Windows Subsystem for Linux (WSL), which provides native support for Ubuntu, Fedora and SUSE, so you can also access many Linux tools, including tar to extract. Quick content from tarball.
In this tutorial, you will learn the steps to use the original tar commands on Windows 10 with Command Prompt and Ubuntu to extract the contents of the .tar.gz file.
Extract tarball .tar.gz, .tgz or .gz with tar on Windows 10
To extract .tar.gz, .tgz, .gz and .zip files with tar on Windows 10, follow these steps:
Step 1. Open Start on Windows 10.
Step 2. Open Command Prompt with admin rights.
Step 3. Enter the following command to use tar to extract the files and press Enter
:
tar -xvzf C:PATHTOFILEFILE-NAME.tar.gz -C C:PATHTOFOLDEREXTRACTION
Extract tarball .tar.gz, .tgz or .gz with tar on Windows 10 Quick tip : In the command, make sure to update the syntax to include source and destination paths. Also, since you already use tar on Windows 10, you don't need to specify the path as if you're running Linux. You can only use the path format used by Windows.
When you complete the steps, after a while, you will have all the files and folders extracted to the destination path you specified.
Assuming that you extracted a tarball created on another system, the article ignores some of the arguments that are often needed to protect rights, but are not necessary on Windows 10 to access the files.
Extract tarball .tar.gz, .tgz or .gz with tar in Linux on Windows 10
To use tar on Linux, you need to install a distribution (such as Ubuntu) by turning on Windows Subsystem for Linux (WSL), then installing Ubuntu from the Microsoft Store.
To extract .tar.gz file with Linux on Windows 10, follow these steps:
Step 1. Open Start.
Step 2. Search Ubuntu and click on the top result to open the application.
Step 3. Enter the following command to extract the contents of the .tar.gz file and press Enter
:
sudo tar -xvzf /mnt/c/PATH/TO/TAR-FILE/Desktop/FILE-NAME.tar.gz -C /mnt/c/PATH/TO/DESTINATION/FOLDER
Extract tarball .tar.gz, .tgz or .gz with tar in Linux on Windows 10 Quick tip : In the command, make sure to update the syntax to include source and destination paths. If there is only one .tar file, you can use the same command described above, but do not include the z argument.
In the above command, for example type sudo to run the application with admin rights, tar to invoke the application and then give it some arguments, including:
x - Instruct tar that you want to extract the content.
v - This is an optional argument to display the extraction process. If not, you will only see the cursor blinking until the process is complete.
z - Tell tar to extract the contents of the .tar.gz file with gzip.
f - Instruct tar the name of the file you are about to extract.
Then you need to specify the path of the tarball file you want to extract. You may have noticed that the path starts with / mnt / c / , instead of c:, and this is because we actually work in the Linux world.
-C - Used to tell tar to change directories. When executing the command, you start in the source directory and then you need to specify the destination directory, this is the path the article specified to complete the command. You can extract files to any directory you want, but remember to start the path with / mnt / followed by the Windows path.
It is important to pay attention to uppercase and lowercase letters while typing a command in Linux.
In this tutorial, TipsMake.com looked at the basic steps to perform a specific task. If you are not a Linux user, there is a lot to learn about tar. If you want to learn more about this tool, in the Ubuntu dashboard, type tar --help
.
You should read it
- How to extract ZIP file on computer quickly
- How to extract Zip files on your computer
- How to decompress IMG files in Windows and macOS
- What is RAR file?
- 3 Simple way to extract ISO file
- What is ISO file?
- Instructions to change DMG file to ISO file
- How to Extract a JAR File
- The best RAR file extraction application on Android
- How to extract a file or folder from a TAR or TAR.GZ file
- How to extract ISO file with Linux
- How to extract IMG files in Windows 10
Maybe you are interested
Why are you starting to see third-party app stores on Google Play?
What to do when Startup Repair takes too long?
5 ways to open the Startup Repair tool on Windows
8 Ways to Fix 'Your PC Did Not Start Correctly' Error
The world's most powerful radar system, tracking multiple targets at a range of up to 3,500 km
What to Know About Peaklight: New Stealth Malware Targets Illegal Movie Downloads