Extract tar with windows

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 (выводить на экран), т.е. не восстанавливать на диск.

Читайте также:  После ввода пароля выкидывает обратно linux

-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 .

Open/Extract TAR File with Freeware on Windows/Mac/Linux

TAR (Tape ARchive) is both a file format (in the form of a type of archive bitstream) and the name of a program used to handle such files. The format was created in the early days of Unix and standardized by POSIX.1-1988 and later POSIX.1-2001.

Initially developed to write data to sequential I/O devices for tape backup purposes, tar is now commonly used to collect many files into one larger file for distribution or archiving, while preserving file system information such as user and group permissions, dates, and directory structures.

A tar archive consists of a series of file objects. Each file object includes any file data, and is preceded by a 512-byte header record. The file data is written unaltered except that its length is rounded up to a multiple of 512 bytes. The original tar implementation did not care about the padding and left the buffer unaltered, but most modern tar implementations fill the extra space with zeros. The end of an archive is marked by at least two consecutive zero-filled records. (The origin of tar’s record size appears to be the 512-byte disk sectors used in the Version 7 Unix file system.) The final block of an archive is padded out to full length with zeros.

The tar format continues to be used extensively in Unix, Linux and OS X. Linux versions use features prominently in various software distributions, with most software source code made available in .tar.gz (gzip compressed tar archives). The tar format is a basis of some types of containment and distribution.

tar archive files usually have the extension .tar, as in somefile.tar. The pun, tarball, is used to refer to a tar file.

A tar archive file contains uncompressed byte streams of the files which it contains. To achieve archive compression, a variety of compression programs are available, such as gzip, bzip2, xz, lzip, lzma, or compress, which compress the entire tar archive. Typically, the compressed form of the archive receives a filename by appending the format-specific compressor suffix to the archive file name. For example, a tar archive archive.tar, is named archive.tar.gz, when it is compressed by gzip.

Short Long Compression
.tgz .tar.gz gzip
.tbz, .tbz2, .tb2 .tar.bz2 bzip2
.taz, .tz .tar.Z compress
.tlz .tar.lz, .tar.lzma lzma
.txz .tar.xz xz

Open/Extract TAR File on Windows

To open/extract TAR file on Windows, you can use 7-Zip, Easy 7-Zip, PeaZip, and so on. I recommend Easy 7-Zip. The Easy 7-Zip is an easy-to-use version of 7-Zip. The open source freeware keeps all features of 7-Zip and adds a few useful features that makes the software more user-friendly.

Easy 7-Zip works on Windows 10/8.1/8/7/Vista/2008/2003/XP/2000 (both 32-bit and 64-bit compatible).

  1. Free Download Easy 7-Zip
  2. Install Easy 7-Zip by step-by-step instructions
  3. The installation will associate TAR with Easy 7-Zip automatically
  4. Double-click on TAR file to open TAR file with Easy 7-Zip

    You will see files or folders within the TAR file then, click button Extract to extract the TAR file.

Alternatively, Right-click on TAR file on Windows Explorer

And then, choose Extract files. , Extract Here, or Extract to «folder\» to extract the TAR file.

Easy 7-Zip Download Links:

Open/Extract TAR File on Mac

To open/extract TAR file on Mac, you can use Mac OS built-in utility Archive Utility, or third-part freeware. For example: GUI Tar, The Unarchiver, Keka, or B1 Free Archiver. B1 Free Archiver is recommended. B1 Free Archiver is a free software for creating archive folder and extracting archive file. B1 Archiver works on all platforms — Windows, Linux, Mac and Android. The freeware supports most popular formats including TAR.

B1 Free Archiver is compatible with:

  • Mac OS X 10.9 Mavericks
  • Mac OS X 10.8 Mountain Lion
  • Mac OS X 10.7 Lion
  • Mac OS X 10.6 Snow Leopard

Open/Extract TAR File on Linux

You need to use command tar. The tar is the GNU version of tar archiving utility.

Open/Extract xz/txz/tar.xz File with Freeware on Windows/Mac/Linux

xz is a lossless data compression program and file format which incorporates the LZMA compression algorithm. xz compresses single files as input, and does not bundle multiple files into a single archive. It is therefore common to compress a file that is itself an archive, such as those created by the tar or cpio Unix programs.

xz has gained notability for compressing packages in the GNU coreutils project, Debian family of systems deb (file format), openSUSE, Fedora, Arch Linux, Slackware, FreeBSD, Gentoo, GNOME, and TeX Live, as well as being an option to compress a compiled Linux kernel. In December 2013, the Linux kernel maintainers kernel.org announced that they would use xz instead of bzip2 as their compression tool from 2014 on.

txz is short for tar.xz . tar.xz is an archive created with tar and xz utilities; contains one or more files first archived using tar and then compressed using xz compression; compressed using a high compression ratio. Beginning with Slackware 13, TXZ files are used to distribute Slackware Linux packages. They can be opened using various Slackware package management tools, including pkgtool and installpkg. Due to the high compression ratio, TXZ files are typically smaller in size than .TGZ files.

Compared to a few other popular stream compression formats, the .xz format provides a couple of advanced features. At the same time, it has been kept simple enough to be usable in many embedded systems. Here is a summary of the features:

  • Streamable: It is always possible to create and decompress .xz files in a pipe; no seeking is required.
  • Random-access reading: The data can be split into independently compressed blocks. Every .xz file contains an index of the blocks, which makes limited random-access reading possible when the block size is small enough.
  • Multiple filters (algorithms): It is possible to add support for new filters, so no new file format is needed every time a new algorithm has been developed. Developers can use a developer-specific filter ID space for experimental filters.
  • Filter chaining: Up to four filters can be chained, which is very similar to piping on the UN*X command line. Chaining can improve compression ratio with some file types. Different filter chain can be used for every independently compressed block.
  • Integrity checks: Integrity of all headers is always protected with CRC32. The integrity of the actual data may be verified with CRC32, CRC64, SHA-256, or the check may be omitted completely. It is possible to add new integrity checks in future, but there is no possibility for developer-specific check IDs like there is for filter IDs.
  • Concatenation: Just like with .gz and .bz2 files, it is possible to concatenate .xz files as is. The decompressor can decompress a concatenated file as if it was a regular single-stream .xz file.
  • Padding: Binary zeros may be appended to .xz files to pad them to fill e.g. a block on a backup tape. The padding needs to be multiple of four bytes, because the size of every valid .xz file is a multiple of four bytes.

Open/Extract xz/txz/tar.xz File on Windows

Easy 7-Zip opens/extracts xz/txz/tar.xz file easily on Windows. The Easy 7-Zip was developed based on 7-Zip. 7-Zip is a famous open source file archiver. The Easy 7-Zip is an easy-to-use version of 7-Zip. The open source freeware keeps all features of 7-Zip and adds a few useful features that makes the software more user-friendly.

Easy 7-Zip works on Windows 10/8.1/8/7/Vista/2008/2003/XP/2000 (both 32-bit and 64-bit compatible).

  1. Free Download Easy 7-Zip
  2. Install Easy 7-Zip by step-by-step instructions
  3. The installation will associate xz/txz/tar.xz with Easy 7-Zip automatically
  4. Double-click on xz/txz/tar.xz file to open xz/txz/tar.xz file with Easy 7-Zip

    You will see files or folders within the xz/txz/tar.xz file then, click button Extract to extract the xz/txz/tar.xz file.

Alternatively, Right-click on xz/txz/tar.xz file on Windows Explorer

And then, choose Extract files. , Extract Here, or Extract to «folder\» to extract the xz/txz/tar.xz file.

Easy 7-Zip Download Links:

You can try other alternative freeware that opens/extracts xz/txz/tar.xz file on Windows. For example:

  • PeaZip
  • B1 Free Archiver
  • Universal Extractor
  • Bandizip
  • FreeArc
  • Bitser

Open/Extract xz/txz/tar.xz File on Mac

B1 Free Archiver opens/extracts xz/txz/tar.xz file on Mac. B1 Free Archiver is a free software for creating archive folder and extracting archive file. B1 Archiver works on all platforms — Windows, Linux, Mac and Android. The freeware supports most popular formats including xz/txz/tar.xz.

B1 Free Archiver is compatible with:

  • Mac OS X 10.9 Mavericks
  • Mac OS X 10.8 Mountain Lion
  • Mac OS X 10.7 Lion
  • Mac OS X 10.6 Snow Leopard

Alternative freeware that opens/extracts xz/txz/tar.xz file on Mac.

Open/Extract xz/txz/tar.xz File on Linux

You need to install xz-utils. XZ Utils is free general-purpose data compression software with high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils. The core of the XZ Utils compression code is based on LZMA SDK, but it has been modified quite a lot to be suitable for XZ Utils. The primary compression algorithm is currently LZMA2, which is used inside the .xz container format. With typical files, XZ Utils create 30% smaller output than gzip and 15% smaller output than bzip2.

XZ Utils consist of several components:

  • liblzma is a compression library with API similar to that of zlib.
  • xz is a command line tool with syntax similar to that of gzip.
  • xzdec is a decompression-only tool smaller than the full-featured xz tool.
  • A set of shell scripts (xzgrep, xzdiff, etc.) have been adapted from gzip to ease viewing, grepping, and comparing compressed files.
  • Emulation of command line tools of LZMA Utils eases transition from LZMA Utils to XZ Utils.

Install xz-utils on CentOS and Fedora

# yum install xz-utils

Install xz-utils on Debian and Ubuntu

$ sudo apt-get install xz-utils

Extract xz file

$ unxz file.xz
$ xz -d file.xz

Compress a file with xz compression

Extract txz/tar.xz file

$ tar xvJf file.txz
$ tar xvJf file.tar.xz

Compress a directory with tar and xz compression

Читайте также:  Переустановка windows ноутбука asus
Оцените статью