Session and utilities
The zcat command
Shows the contents of a .gz file without decompressing it to disk. It is cat + gunzip.
Syntax
zcat archivo.gzCopy-ready examples
$ printf 'hola\n' > f.txt && gzip -k f.txt && zcat f.txt.gzRead a compressed fileYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- It does not modify or create files: it only shows the contents.
FAQ
What is it for?
To inspect a .gz without using space to decompress it.
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