Home > Commands, Linux > Read .gz text files on the fly

Read .gz text files on the fly

Logging systems usually compress old logs into Gzip files. Uncompressing those files to check old logs can be a pain in the neck, specially if you don’t know which file contains the entries of a specific date. The zless command will help you a lot with this task. For example, to read Tomcat’s compressed logs you just have to execute:

zless catalina.out.1.gz

You will see the content of the compressed file as if you were using the less command.

Advertisements
Categories: Commands, Linux Tags: , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: