使用基于 Unix 的归档应用程序 tar 创建具有TGZ或 GZ 文件扩展名的文件,并使用(TGZ)GZIP Compression进一步压缩。这些文件由一组文件组成,这些文件已放置在TAR存档中,主要是为了便于存储和跟踪。 TAR 文件(TAR files)通常在创建后被压缩;压缩的TAR文件称为 tarball,有时使用“双重”扩展名,如“. TAR .GZ”,但通常缩写为“.TGZ”或“.GZ”。
如何提取.TAR.GZ、.TGZ或 .GZ。文件
.TAR.GZ、.TGZ 或 .GZ。文件通常在基于 Unix 的操作系统(如Ubuntu和 macOS)上的软件安装程序中看到,用于数据存档和备份。但它们有时用于常规数据归档目的,因此,Windows 10 用户也可能会遇到此类文件并可能需要提取其内容。
提取 .TAR.GZ、.TGZ 或 .GZ。文件很容易。可以使用免费和开源的7-Zip和PeaZip等第三方应用程序来提取它们。除了外部应用程序之外,Windows 10 还包括对TAR的本机支持,可以帮助您使用简单的命令提示符提取(Command Prompts)TAR文件。今天我们讨论其中的一些方法:
- 使用第三方软件
- 使用本机tar命令
让我们详细看看这两种方法。
1]使用第三方软件
您可以使用第三方软件提取压缩文件(software to extract compressed files)。
a] 使用 7-Zip 打开 TGZ 文件
7-Zip是一个免费的开源文件存档器,具有高压缩率。该软件可以在任何计算机上使用,包括商业组织中的计算机。此实用程序可以帮助您提取压缩文件并以多种不同格式创建自己的压缩文件。要使用 7-Zip 提取TAR文件,请执行以下步骤:
1]打开(Open)7-Zip 网页并根据您的系统类型(System Type)下载 32 位或 64 位 7-Zip 版本。
注意:要检查您的系统类型,请打开“设置”,然后转到“系统”并单击“关于”。(Note: To check your system type, open ‘Settings’ then go to ‘System’ and click on ‘About’.)
2] 下载后,打开 7-Zip 安装程序,将软件安装到您的Windows系统。
3]接下来,从(Next)搜索(Search)菜单中打开 7-Zip 应用程序。
4] 现在,在 7-Zip 的文件浏览器中,转到包含TGZ文件的文件夹。
5] 现在选择并右键单击TGZ文件,点击7-zip,然后按提取文件(Extract files)打开提取(Extract)窗口,如下所示。
6]您将看到一个新的文件夹路径已包含在“提取到”(Extract to’)文本框中。但是,如果您愿意,可以根据需要修改此路径。
7] 按“确定”(OK’)提取 TGZ 文件。
8] 现在,在同一个 7-Zip 窗口中双击解压缩的TAR文件夹将其打开。
打开初始存档后,双击子TAR文件夹/文件以打开并查看内容。
阅读(Read):如何(How to zip and unzip files)使用内置功能在Windows 10中压缩和解压缩文件。(Windows 10)
b] 使用在线 TGZ 转换器将 TGZ 文件转换为 ZIP 格式(b] Convert TGZ Files to the ZIP Format using online TGZ converter)
Windows 10 的文件资源管理器(File Explorer)允许用户提取ZIP 文件(ZIP Files)。本质(Intrinsically)上,您可以通过先将TGZ文件转换为ZIP格式来打开该文件的内容。文件转换完成后,用户可以使用“全部提取”(Extract All’)选项来解压缩ZIP。您可以使用在线转换器将TGZ文件转换为ZIP格式,方法如下:
1]在您的网络浏览器中打开Convertio网络工具。(Convertio)这是一个在线TGZ ( TAR.GZ )转换器(Converter),可以在网络上将文件与 tgz 相互转换。
2] 现在选择“选择文件”(Choose Files’)以选择要转换为ZIP的(ZIP)TGZ存档。
3]从文件夹中选择(Select)文件,然后单击“打开”(Open’)将文件添加到在线转换器。
4]选择转换类型为' Zip'
5] 现在点击“转换”(Convert’)按钮转换存档。
5] 单击“下载”(Download’)并保存新的 ZIP 存档。
6]转到下载的文件夹并双击下载的ZIP文件以打开其提取(Extract)选项卡。现在,点击“全部提取”(Extract all’)按钮直接在下面打开窗口。
7]选择目的地并点击提取(Extract)。
现在双击 ZIP 的解压缩文件夹并打开其内容。
阅读(Read):如何在 Windows 上安装 CURL。
2]使用本机 tar 命令在Windows 10中(Windows 10)打开 TAR(Open TAR)文件
Windows 10包含对 tar 的本机支持,您可以使用命令提示符(Command Prompt)来提取这些文件。除此之外,用户可以使用Windows Subsystem for Linux ( WSL ),它为(WSL)Ubuntu、Fedora和SUSE带来了本机支持,因此您还可以访问许多Linux工具,包括 tar 以立即从 tarball 中提取内容。在这里,我们讨论了在Windows 10上使用本机 tar 命令的步骤,使用命令提示符(Command Prompt)和Ubuntu来提取.tar.gz文件的内容。
a]在 Windows 11/10 上使用 tar提取 .tar.gz(Extract .tar.gz)、.tgz或 .gz 压缩包(.tgz)
Windows 111/0上使用 tar提取.tar.gz、.tgz或 .gz 文件,请使用以下步骤:
1]打开“开始”(Start’)菜单。
2]搜索“命令提示符”(Command Prompt’)
3]右键单击(Right-click)第一个结果并点击“以管理员身份运行(Run as administrator)”
4] 现在键入以下命令以使用 tar 提取文件并按“ Enter”:
tar -xvzf C:\PATH\TO\FILE\FILE-NAME.tar.gz -C C:\PATH\TO\FOLDER\EXTRACTION
确保(Make)更新语法以包含源路径和目标路径。
完成上述步骤后,您将所有文件和文件夹提取到指定的目的地。
b ] 在Windows 10上的(Windows 10)Linux上使用 tar提取 .tar.gz(] Extract .tar.gz)、.tgz或 .gz 压缩包(.tgz)
在Windows(Windows)上使用 tar 的另一种方法是在您的系统上安装Ubuntu。在您的Windows 10系统上安装后,请按照以下步骤操作:
1]从“开始”(Start’)菜单启动“ Ubuntu”
2]现在,键入以下给出的命令以提取 .tar.gz 文件的内容:
sudo tar -xvzf /mnt/c/PATH/TO/TAR-FILE/Desktop/FILE-NAME.tar.gz -C /mnt/c/PATH/TO/DESTINATION/FOLDER
确保(Make)更新语法以包含源路径和目标路径。
3] 现在按“ Enter”键。
现在,您将所有文件和文件夹提取到指定的目的地。
Thus, you can now extract .TAR.GZ, .TGZ or .GZ. on Windows 11/10.
阅读下一篇(Read next):如何使用命令行工具提取 CAB 文件(How to extract CAB File using command-line tools)。
How to unzip, open or extract TAR.GZ, TGZ or GZ. Files in Windows 11/10
A file with the TGZ or GZ file extension іs created using the Unix-based archival application tar аnd further compressed using GZIP Compression. These files are made up of a collection of files that have been placed in a TAR archive mainly for making storage аnd tracking easy. TAR files are often compressed once created; the compressed TAR files are called tarballs and sometimes use a “double” extension like “.TAR.GZ” but are usually shortened to “.TGZ” or “.GZ”.
How to extract .TAR.GZ, .TGZ or .GZ. file
.TAR.GZ, .TGZ or .GZ. files are typically seen with software installers on Unix-based operating systems like Ubuntu and macOS for data archival and backups. But they are sometimes used for regular data archiving purposes, hence, Windows 10 users may also come across such types of files and may need to extract their content.
Extracting a .TAR.GZ, .TGZ or .GZ. file is easy. They can be extracted using third-party applications like 7-Zip and PeaZip which are free and open-sourced. In addition to external apps, Windows 10 includes native support for TAR which can help you extract TAR files using simple Command Prompts. Today we discuss a few of these methods:
- Using third-party software
- Using the native tar commands
Let’s look at these two methods in detail.
1] Using third-party software
You can use third-party software to extract compressed files.
a] Open TGZ files with 7-Zip
7-Zip is a free, open-source file archiver with a high compression ratio. This software can be used on any computer, including the ones in a commercial organization. This utility program can help you extract compressed files and create your own compressed files in several different formats. To extract TAR files using 7-Zip, follow the below steps:
1] Open 7-Zip webpage and download either 32 or 64-bit 7-Zip version based on your System Type.
Note: To check your system type, open ‘Settings’ then go to ‘System’ and click on ‘About’.
2] Once downloaded, open the 7-Zip installer to install the software to your Windows system.
3] Next, open the 7-Zip app from the Search Menu.
4] Now, within the 7-Zip’s file browser go to the folder that includes your TGZ file.
5] Now select and right-click the TGZ file, hit, 7-zip, and press the Extract files to open the Extract window as shown below.
6] You will see a new folder path is already included in the ‘Extract to’ text box. But if you want you can modify this path as required.
7] Press ‘OK’ to extract the TGZ file.
8] Now, double-click the extracted TAR folder in the same 7-Zip window to open it.
Once you open the initial archive, double-click on the sub TAR folders/files to open and view the contents.
Read: How to zip and unzip files in Windows 10 using the built-in feature.
b] Convert TGZ Files to the ZIP Format using online TGZ converter
Windows 10’s File Explorer allows the users to extract ZIP Files. Intrinsically, you can open the contents of a TGZ file by converting it to the ZIP format first. Once the files are converted, users can utilize the ‘Extract All’ option to decompress the ZIP. You can convert TGZ files to ZIP format using online converters, here is how:
1] Open the Convertio web tool in your web browser. This is an Online TGZ (TAR.GZ) Converter that can convert files to and from tgz on the web.
2] Now select ‘Choose Files’ to select a TGZ archive to convert to ZIP.
3] Select the file from the folder and click ‘Open’ to add the file to the online converter.
4] Select the conversion type to ‘Zip’
5] Now hit the ‘Convert’ button to convert the archive.
5] Click ‘Download’ and save the new ZIP archive.
6] Go to the downloaded files folder and double-click the downloaded ZIP file to open its Extract tab. Now, hit the ‘Extract all’ button to open the window directly below.
7] Select the Destination and hit Extract.
Now double click the ZIP’s extracted folder and open its content.
Read: How to install CURL on Windows.
2] Open TAR files in Windows 10 using native tar commands
Windows 10 consists of native support for tar that you can use with Command Prompt to extract these files. In addition to this, users can use the Windows Subsystem for Linux (WSL) that brings native support for Ubuntu, Fedora, and SUSE, and therefore you can also access many Linux tools, including tar to instantly extract content from tarballs. Here we discuss the steps to use native tar commands on Windows 10 using Command Prompt and Ubuntu to extract contents of a .tar.gz file.
a] Extract .tar.gz, .tgz, or .gz tarballs using tar on Windows 11/10
For extracting .tar.gz, .tgz, or .gz files using tar on Windows 111/0, use these steps:
1] Open the ‘Start’ menu.
2] Search for ‘Command Prompt’
3] Right-click the first result and hit ‘Run as administrator’
4] Now type the below command to use tar to extract the files and hit ‘Enter’:
tar -xvzf C:\PATH\TO\FILE\FILE-NAME.tar.gz -C C:\PATH\TO\FOLDER\EXTRACTION
Make sure to update the syntax to include the source and destination paths.
Once the above steps are completed, you will have all the files and folders extracted to the specified destination.
b] Extract .tar.gz, .tgz, or .gz tarballs using tar on Linux on Windows 10
Another way of using tar on Windows is by installing Ubuntu on your system. Once installed on your Windows 10 system follow the steps given below:
1] Launch ‘Ubuntu’ from the ‘Start’ menu
2] Now, type the below-given command to extract the content of .tar.gz file:
sudo tar -xvzf /mnt/c/PATH/TO/TAR-FILE/Desktop/FILE-NAME.tar.gz -C /mnt/c/PATH/TO/DESTINATION/FOLDER
Make sure to update the syntax to include the source and destination paths.
3] Now hit the ‘Enter’ key.
Now, you will have all the files and folder extracted to the specified destination.
Thus, you can now extract .TAR.GZ, .TGZ or .GZ. on Windows 11/10.
Read next: How to extract CAB File using command-line tools.