commands

xz — compress xz streams

Compresses data using the xz format by default; -c sends output to stdout, -d decodes, -t tests. Memory and performance depend on settings and input. Example assumes a fresh archive lab fixture with new output names.

Formal Syntax & Structure

linux syntaxlinux
xz [-c|-d|-t] [FILE...]

Parameters & Attributes

NameTypeDescription
-coptionstdout
-doptiondecode
-toptiontest
FILEoperandinput

Return Value

exit status and output

Compresses data using the xz format by default; -c sends output to stdout, -d decodes, -t tests. Memory and performance depend on settings and input.

Working Example

Example Snippetlinux
xz -c notes.txt > notes.xzxz -t notes.xz && xz -dc notes.xz
Linux Reference