Read the file inside compressed .gz files without extract

Read the file inside compressed .gz files without extract

I would like to share 3 simple commands by which U can read the files inside the compressed .gz file without extracting.

For eg.
We have a log file called test.log and we compressed it by using command “gzip test.log” .
It will compressed the file into test.log.gz .

Now U want to read the test.log file which is compressed inside the file test.log.gz .

Command 1: zcat test.log.gz

Command 2 : zless
test.log.gz

Command 3 : zmore
test.log.gz

This is very useful command I hope U will enjoy it.
Cheers !!

2 thoughts on “Read the file inside compressed .gz files without extract”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.