Unpacking the tar.xz archive

I encountered an archive of the tar.xz type. What is it and how do I unpack it?

Author: stanislav, 2010-12-08

4 answers

Xz is a file format for data compression using the LZMA algorithm. To use it on Ubuntu, you need to install xz-utils.

Installation:

sudo apt-get install xz-utils

Unpacking:

tar -xpJf archive.tar.xz
 14
Author: stanislav, 2010-12-10 11:34:15

In the future, in order not to care about what type of archive, you can install the atool utility:

$ sudo apt-get install atool

For unpacking (I'll show you with examples):

$ aunpack a.7z
$ aunpack a.tag.gz
$ aunpack a.zip

For archiving:

$ apack a.7z file1.txt file2 dir1

To view the content:

$ als a.7z

And others

 7
Author: Vitaliy, 2011-03-05 11:15:45

There is also a universal solution.

All popular distributions of the gnu/linux operating system have the package dtrx ("do the right extraction"). when you install it by dependencies, the missing unpackers in the system will also be installed.

The program independently determines what is inside the file, and is able to unpack tar, zip (including self-extracting .exe), cpio, rpm, deb, gem, 7z, cab, rar, files created by InstallShield, compressed by gzip, bzip2, lzma and compress.

If other archives are found inside the archive/compressed files, the program interactively prompts you to unpack them as well.

Using:

$ dtrx сжатый.файл.и.или.архив

Developer page

Man dtrx

 3
Author: aleksandr barakin, 2016-02-12 11:02:15

On Linux, there is unar, which unpacks everything and normally processes the Russian encoding in zip. Also suitable for tar.xz.

 0
Author: Anton Abrosimov, 2019-08-07 20:31:48