web123456

How to decompress files

The latest compression rate king of XZ compression

The compression of xz may be very unfamiliar with many, but do you know that xz is a compression tool that is included in Linux by default.

XZ has been used very little before, so there is almost nothing to mention.

I saw this compression format when I downloaded phpmyadmin. The xz format of the phpmyadmin compression package is actually smaller than 7z, which aroused my interest.

The latest period of time, you will often hear the sound of xz being used, such as the latest archlinux that uses xz compression. However, one disadvantage of xz is that the compression time is relatively long, which is longer than 7z compression time. However, compression is one-time, so it can be ignored.

xz compressed file method or command

xz -z File to be compressed

If you want to keep the compressed file and add the parameter -k, if you want to set the compression rate, add the parameters -0 to -9 to adjust the compression rate. If not set, the default compression level is 6.

xz decompress file method or command

xz -d File to be decompressed

Also use the -k parameter to retain the decompressed file.

How to create or decompress a file

People who are used to tar czvf or tar xzvf may also want to use a single command to solve decompression or compression. Actually, it doesn't work. There are no parameters in tar that are specified in xz format. For example, z is for gzip and j is for bzip2.

Create a file: Just create a file first by tar cvf xxx/, and then use xz -z to compress it into

Unzip the file: first decompress xz -d to then use tar xvf to unpack.