JIYIK CN >

Current Location:Home > Learning > OPERATING SYSTEM >

How to decompress x.tar.xz format files under Linux

Author:JIYIK Last Updated:2025/04/08 Views:

A lot of software found today is in the tar.xz format, which is a lossless data compression file format that uses the LZMA compression algorithm. Like gzip and bzip2, it supports multiple file compression, but the convention is not to compress more than one target file into the same archive. Instead, xz is often used as a compression format for archive files themselves, such as archives created with the tar or cpio Unix programs. xz is used in GNU coreutils (version 7.1 or later). xz is included as a compression package in Fedora (since Fedora 12), Arch Linux, FreeBSD, Slackware Linux, CRUX and Funtoo.

xz utils is the next generation of lzma utils. lzma utils was renamed xz utils.

xz utils takes twice as long as bzip2 to compress,
half as long as lzma utils to compress, half
as large a file as bzip2 to compress,
slightly larger than lzma utils to compress,
one-third as long as bzip2 to decompress,
slightly faster than lzma utils to decompress,
and only twice as long as gzip to decompress.

When compressing, the files generated by xz utils using *.xz format are slightly larger than those generated by *.lzma format. The test sample is small, and the results of multiple tests are inconsistent. It is impossible to determine whether xz utils using *.xz or *.lzma format has an advantage in compression and decompression time.

So far, lzma utils still has the best compression ratio, and xz utils has the best decompression time.

An implementation of the xz file format, the XZ utility, is freely available on the web. GNU tar uses this software to transparently support the xz file format (just as it does gzip or bzip2) since version 1.22. As a lot of software has entered the public domain (e.g. liblzma, etc.), version 4.999.9beta of this implementation is released under the terms of the GNU LGPL and the GNU GPL.

7-Zip supports the xz file format in version 9.04 beta.

First go to http://download.chinaunix.net/download/0014000/13078.shtml

Download the xz-5.0.3.tar.bz2 decompression tool from the page, then compile and install it

tar -xf xz-5.0.3.tar
cd xz-5.0.3
./configure
make
make install

In this way, you can use the xz command to decompress the tar.xz format file.

1. xz -d linux-3.1-rc4.tar.xz
2. tar -xf linux-3.1-rc4.tar

Here is the downloaded Linux kernel source code. You can clearly see that the tar.xz is only a few dozen M in size, but after decompression it is several hundred M. This is indeed a very high compression ratio.

This article is transferred from http://bbs.chinaunix.net/thread-3610738-1-1.html

For reprinting, please send an email to 1244347461@qq.com for approval. After obtaining the author's consent, kindly include the source as a link.

Article URL:

Related Articles

Restart PostgreSQL in Ubuntu 18.04

Publish Date:2025/04/09 Views:72 Category:PostgreSQL

This short article shows how to restart PostgreSQL in Ubuntu. Restart PostgreSQL Server in Ubuntu You can restart Postgres server in Ubuntu using the following command. Order: sudo service postgres restart Sometimes the above command does n

Issues to note when installing Apache on Linux

Publish Date:2025/04/08 Views:78 Category:OPERATING SYSTEM

As the most commonly used web server, Apache can be used in most computer operating systems. As a free and open source Unix-like operating system, Linux and Apache are a golden pair. This article will introduce the installation and use of A

Summary of vim common commands

Publish Date:2025/04/08 Views:115 Category:OPERATING SYSTEM

In Linux, the best editor should be vim. However, the complex commands behind vim's powerful functions also make us daunted. Of course, these commands do not need to be memorized by rote. As long as you practice using vim more, you can reme

Detailed explanation of command return value $? in Linux

Publish Date:2025/04/08 Views:58 Category:OPERATING SYSTEM

? is a special variable. This variable represents the return value of the previous command. That is to say, when we run certain commands, these commands will return a code after running. Generally, if the command is successfully run, the re

Common judgment formulas for Linux script shell

Publish Date:2025/04/08 Views:159 Category:OPERATING SYSTEM

In shell script programming, predicates are often used. There are two ways to use predicates, one is to use test, and the other is to use []. Let's take a look at how to use these two methods through two simple examples. Example 1 # test –

Scan to Read All Tech Tutorials

Social Media
  • https://www.github.com/onmpw
  • qq:1244347461

Recommended

Tags

Scan the Code
Easier Access Tutorial