Linux unzip. tar. xz format file method

  • 2020-06-03 09:09:27
  • OfStack


xz compression is unfamiliar to many, but xz is the default compression tool for most linux, and xz is smaller than 7z.

This compression format was encountered while downloading the ES11en.js source package today. Check 1 data, here for 1 record, share out for your reference to learn, the following to see the detailed record.

Create the xz zip file

xz -z  File name to be compressed 

-k Keep the original document;

-0 to -9 Adjust the compression ratio. If not set, the default compression level is 6;

Unzip the xz zip file

xz -d  Unzip the file 

-k Keep the original document;

The extracted file is a packaged file in tar format, which needs to be executed:

tar -xvf  Unpack file name 

Note that the tar command does not directly extract the xz compression format parameters (for example -f Unpack the bzip2, -z Unpack the gzip)

In fact, tar.xz compression package is xz compression after tar packaging folder (-ES52en-ES53en because tar by default supports bzip2 and gzip compression at the same time of packaging).


Related articles: