Step 1/1: Read compressed files directly

zcat prints a .gz file decompressed, without writing the result to disk. With a pipe you can search compressed logs directly: zcat app.log.gz | grep ERROR.

$ zcat app.log.gz | grep ERROR
Fundamentalszcat
Search without decompressing
Without decompressing app-2026-01-11.log.gz, use zcat and grep to count how many lines contain ERROR.
gunzipNext lesson:diff