Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

xz

High compression ratio compressor

Syntax

xz [OPTION]... [FILE]...

Common Options

-dDecompress
-kKeep original file
-cWrite to stdout
-fForce overwrite
-0Fastest compression
-9Best compression
-eExtreme compression
-tTest integrity
-lShow compression info
-vVerbose output
-TSpecify thread count

Common Examples

xz file.txt

Compress file

xz -k file.txt

Compress keeping original

xz -d file.txt.xz

Decompress file

xz -9e file.txt

Extreme compression

xz -l file.txt.xz

Show compression info

xz -T4 file.txt

Compress with 4 threads

xz -c file.txt > file.xz

Compress to stdout

Related Commands

Related Tools

More Code & Dev Tools