Session and utilities

The xzcat command

Shows the contents of a .xz file without decompressing it to disk.

Syntax

xzcat archivo.xz

Copy-ready examples

$ printf 'hola\n' > f.txt && xz -k f.txt && xzcat f.txt.xzRead a .xz

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • It only works with .xz.

Related commands

FAQ

Does it work for .gz?

No: for .gz use zcat.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course