0

How do I open a compressed file in less mode. I am able to grep using zgrep and using zcatI can open, but the file is big I want to open in less mode.

Aravind
  • 1,559
  • 9
  • 31
  • 44
  • You didn't specify the type of compression - `zgrep` for example doesn't work with `zstd` compress (ok that one wasn't around when you wrote the question). So this quesiton is only valid for `gzip` style compression. – Cornelius Roemer Aug 28 '22 at 20:10

2 Answers2

3

Use zless utility from that same gzip suite, it combines functionality of gzip -d and less into one

2

This is what pipes were made for:

 gzip -dc | less
Jenny D
  • 13,022
  • 3
  • 38
  • 54