Skip to content

zcat Command Cheat Sheet

zcat allows you to view the contents of .gz compressed files without extracting them.


Basic Usage

zcat file.gz

Redirect Output to File

zcat file.gz > output.txt

Combine with grep

zcat logs.gz | grep "error"