$ xz --help
Usage: xz [OPTION]... [FILE]...
Compress or decompress FILEs in the .xz format.
-z, --compress force compression 强制压缩
-d, --decompress force decompression 强制解压缩
-t, --test test compressed file integrity 测试压缩文件的完整性
-l, --list list information about .xz files 列出有关.xz文件的信息
-k, --keep keep (don't delete) input files 保留(不删除)输入文件
-f, --force force overwrite of output file and (de)compress links 强制覆盖输出文件并(解)压缩链接
-c, --stdout write to standard output and don't delete input files 写入标准输出并不删除输入文件
-0 ... -9 compression preset; default is 6; take compressor *and*
decompressor memory usage into account before using 7-9! 压缩预设;默认值为6
-e, --extreme try to improve compression ratio by using more CPU time;
does not affect decompressor memory requirements
-T, --threads=NUM use at most NUM threads; the default is 1; set to 0
to use as many threads as there are processor cores
-q, --quiet suppress warnings; specify twice to suppress errors too
-v, --verbose be verbose; specify twice for even more verbose
-h, --help display this short help and exit
-H, --long-help display the long help (lists also the advanced options)
-V, --version display the version number and exit
With no FILE, or when FILE is -, read standard input.
Report bugs to <lasse.collin@tukaani.org> (in English or Finnish).
XZ Utils home page: <https://tukaani.org/xz/>
使用示例
# 压缩
tar cvf hosts.tar /etc/hosts
xz -z hosts.tar
# 压缩后的文件
$ ls
hosts.tar.xz
$ hosts.tar.xz
hosts.tar.xz: XZ compressed data, checksum CRC64
# 解压
xz -d hosts.tar.xz
tar xvf hosts.tar
We use cookies and similar methods to recognise visitors and remember preferences. We also use them to measure
campaign effectiveness and analyse site traffic.
By selecting 'Accept', you consent to the use of these methods by us and trusted third parties.