- TAR — архивирование данных в Windows 10.
- Создание архивов.
- Отображение содержимого архива
- Извлечение файлов из архива.
- Need to open a TAR file? Download WinZip to open your file now.
- What is a TAR file extension?
- How to open TAR files
- Open TAR files on Windows or Mac
- WinZip opens and extracts TAR Compressed Archive Files—and many more formats
- How to unpack a tar file in Windows
- Contents
- Introduction
- TarTool
- How to open or extract .TAR.GZ, .TGZ or .GZ. Files in Windows 10
- How to extract .TAR.GZ, .TGZ or .GZ. file
- 1] Using third-party software
- a] Open TGZ files with 7-Zip
- 2] Open TAR files in Windows 10 using native tar commands
- a] Extract .tar.gz, .tgz, or .gz tarballs using tar on Windows 10
- b] Extract .tar.gz, .tgz, or .gz tarballs using tar on Linux on Windows 10
TAR — архивирование данных в Windows 10.
Начиная с Windows 10 build 17063 утилита командной строки tar.exe является штатным средством архивирования данных. Утилита tar многие годы являлась основным средством архивирования в ОС семейства Linux и первоначально использовалась для создания архивов на магнитной ленте ( отсюда ее название tar — t ape ar chive ). В настоящее время позволяет создавать архивы на любых носителях и практически, является основным средством хранения файлов и каталогов в одном файле специального формата для ОС семейства Linux/BSD. Главным достоинством формата tar является то, что архив содержит не только сами данные архивируемых файлов, но и информацию о структуре каталогов, владельце, и отметки времени ( время создания, модификации, доступа ). Архиватор tar не выполняет сжатие архивируемых данных, он всего лишь упаковывает множество файлов в один файл, размер которого приблизительно равен суммарному размеру упакованных файлов ( немного больше за счет добавления собственных служебных заголовков ). В Linux для сжатия используются внешние программы (gzip/bzip2/xz/lzma ), в Windows – дополнительные параметры командной строки. Используемая в Windows 10 утилита tar.exe базируется на bsdtar
Общий формат командной строки:
Как это принято в *nix системах, строчные и заглавные буквы в параметрах командной строки различаются. Сначала необходимо задать параметры архивирования:
-c — создать архив.
-r — добавить/заменить файлы в существующем архиве.
-t — отобразить список файлов в архиве.
-u — обновить содержимое архива. В существующем архиве будут заменены только устаревшие файлы.
-x — извлечь файлы из архива.
-b # — использовать # -байтные записи для блоков ввода/вывода. # может принимать значения от 1 до 8192. По умолчанию используются записи длиной 512 байт.
-f — путь и имя файла архива. По умолчанию – магнитная лента (\\.\tape0)
-v — подробный режим вывода информации на экран.
-w — интерактивный режим, когда утилита выдает запрос на добавление файлов к архиву.
Создание архивов.
Формат командной строки:
tar -c [параметры] [ | | @ | -C
-z, -j, -J, —lzma — параметры сжатия архива — gzip/bzip2/xz/lzma
—exclude — исключить из архивирования файлы соответствующие шаблону pattern
, — файлы и каталоги, добавляемые в архив.
@ — добавить в архив записи из уже существующего архива archive
-C — сделать текущим каталогом каталог dir .
tar -c -f D:\Stordiag.tar D:\StorDiag\*.* — создать архив D:\Stordiag.tar из всех файлов каталога D:\StorDiag\
tar -cvf D:\Stordiag.tar D:\StorDiag\*.* — то же, что и в предыдущем примере, но параметры объединены ( -c –v –f можно использовать как –cvf) и добавлен подробный режим вывода ( -v ).
tar -cvzf D:\123.tar.gz D:\StorDiag\*.* @D:\StorDiag.zip — то же, что и в предыдущем примере, но выполняется сжатие архива методом gzip и к файлам создаваемого архива добавляется содержимое уже существующего архива D:\StorDiag.zip
tar -cvzf D:\123.tar.gz D:\StorDiag\*.reg @D:\StorDiag.zip — то же, что и в предыдущем примере, но для архивирования отбираются файлы с расширением .reg . Действие шаблона поиска файлов не распространяется на содержимое архива @D:\StorDiag.zip
Отображение содержимого архива
Формат командной строки:
tar -t [параметры] [ ]
шаблон — шаблон для выводимого списка файлов. Если не задан – выводится список всего содержимого архива.
tar -tf D:\StorDiag.tar.gz — отобразить содержимое архива D:\StorDiag.tar.gz
Извлечение файлов из архива.
tar -x [параметры] [ ]
шаблон определяет перечень извлекаемых из архива файлов. Если не задан, то извлекаются все.
-k — не перезаписывать существующие файлы.
-m — не восстанавливать отметку времени модификации файлов.
-O — записывать содержимое в stdout (выводить на экран), т.е. не восстанавливать на диск.
-p — восстанавливать разрешения, включая списки доступа (ACLs), владельца (owner), атрибуты файлов.
tar -xvzf D:\StorDiag.tar.gz — извлечь содержимое архива StorDiag.tar.gz в текущий каталог.
tar -xvzf D:\StorDiag.tar.gz *.reg — извлечь только файлы с расширением .reg
tar -xvzOf D:\123.tar.gz *.reg — то же, что и в предыдущем примере, но с выдачей информации на экран.
Обратите внимание, что извлечение файлов из архива всегда выполняется в текущий каталог. Поэтому для извлечения файлов в нужный каталог, не являющийся текущим можно воспользоваться параметром -C меняющий текущий каталог на dir перед извлечением файлов из архива.
Краткую справку по использованию TAR можно получить по команде:
И соответственно, более полную справку можно получить по команде tar –help или tar –h .
Need to open a TAR file? Download WinZip to open your file now.
— Rated 5 stars by CNET
What is a TAR file extension?
The name «TAR» refers to Tape Archive files and goes back to when files where stored on tape drives. TAR is a software utility used for collecting several files into one archive file, including videos and images, in one for easier distribution or archiving. The resulting TAR files contain useful information about the files they contain, such as user permissions, dates, directory structures and more. Since TAR files are simply archives, they need to be compressed by another utility, such as gzip, to reduce their size. The TAR format is often used for open source software distribution. Tar unzip software like WinZip is needed to unpack a tar file.
How to open TAR files
- Save the .tar file to the desktop. If your compressed file was downloaded from a website, it may be saved in the Downloads folder in your Documents or user directory.
- Launch WinZip from your start menu or Desktop shortcut. Open the compressed file by clicking File > Open. If your system has the compressed file extension associated with WinZip program, just double-click on the file.
- Select all the files and folders inside the compressed file. Or multi-select only the files or folders you want to open by holding the CTRL key and left-clicking on them.
- Click 1-click Unzip and choose Unzip to PC or Cloud in the WinZip toolbar under the Unzip/Share tab.
- Choose the destination folder to place the extracting files and click «Unzip» button.
- Find your extracted files in the destination folder.
Open TAR files on Windows or Mac
- WinZip 25
- Windows 10
- Windows 8
- Windows 7
- Windows Vista
- Windows XP
- Internet Explorer 8 or later
- WinZip Mac 8
- Mac OS X 10.8, 10.9, or 10.10
- Intel 64-bit processor
- Supports Apple Retina Displays
WinZip opens and extracts TAR Compressed Archive Files—and many more formats
We designed WinZip to open and extract from the widest range of file formats, including all of the following:
Get WinZip now to unzip your TAR file(s), then enjoy all that the world’s most popular compression utility has to offer, including the easiest and most practical file compression, encryption, packaging, file management and data backup capabilities.
Also visit our partner site www.openthefile.net for more options to open TAR files.
Copyright ©2021 Corel Corporation. All Rights Reserved. WinZip is a Registered Trademark of Corel Corporation
How to unpack a tar file in Windows
Contents
Introduction
Source code is often packed for download as a TAR (Tape ARchive) file, that is a standard format in the Unix/Linux world. These files have a .tar extension; they can also be compressed, the extension is .tar.gz or .tar.bz2 in these cases. There are several ways to unpack these files.
If you have MinGW/MSYS or Cygwin installed, you can use the tar command to unpack such files:
Try tar —help or see the tar man page for more information.
Another option is to install 7-Zip, which has a nice graphical user interface. 7-Zip can also be used to unpack many other formats and to create tar files (amongst others).
- Download and install 7-Zip from 7-zip.org. If you do not want to use 7-Zip as a command line tool, skip the next steps.
- Add the directory you installed 7-Zip into to your path (Start -> Control Panel -> System -> Advanced -> Environment Variables).
- Move the tar file to the directory you wish to unpack into (usually the tar file will put everything into a directory inside this directory).
- Open a command prompt, and cd to the directory.
- If the tar file is compressed, type 7z x filename.tar.gz at the command prompt (where filename.tar.gz is the name of the compressed tar file). This results in a tar file called filename.tar
- Type 7z x filename.tar at the command prompt (where filename.tar is the name of the tar file).
Instead of using 7-Zip on the command line, you can use the file manager and click on a .tar, .tar.gz, or.tar.bz2 file; 7-Zip will automatically start.
TarTool
A simple windows command line tool (no install , just unzip)
Its hosted on codeplex tartool, complete with the source code.
How to open or extract .TAR.GZ, .TGZ or .GZ. Files in Windows 10
A file with the TGZ or GZ file extension is created using the Unix-based archival application tar and 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 and 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 its 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
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.
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 10
For extracting .tar.gz, .tgz, or .gz files using tar on Windows 10, 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’:
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 folder 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 10 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:
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.