xz
ArchivesFundamentalsReference onlyCompress with xz (high ratio)
Name: xz: an LZMA2 compressor
This command is outside what the site lets you practise (mostly distribution-specific or rarely used tools). This page describes how to use it; try it on your own Linux system.
Description
xz uses LZMA2 and achieves the best ratio of the common tools; many packages and kernel tarballs use it. The cost is slower compression and more memory; -T0 uses all cores.
Syntax
xz [OPTION]... FILE...Common options
| -d / --decompress | Decompress |
| -k / --keep | Keep the original |
| -c / --stdout | Write to standard output |
| -T0 | Use all CPU cores |
| -0 … -9 | Level: -0 fastest, -9 smallest (-6 by default) |
| -e / --extreme | Spend more time for a little more compression |
| -l / --list | Show information about the file |
| -t / --test | Check that the file is intact |
| -v / --verbose | Show progress |
Examples
$ xz -k -T0 big.tar
Multi-threaded compression
Explain