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 ERRORFundamentalszcat
Search without decompressing
Without decompressing app-2026-01-11.log.gz, use zcat and grep to count how many lines contain ERROR.
$$$$$$$$$$$$$$$$gggggggggggggggggggggggggggggggg
Exercise: Search without decompressing. The result appears on the left when you're done
.
user@elp:~/challenge$