2009-04-28

How to view compressed log file in bzip format

This post is similar to the previous one talking about how to view a log file compressed in gnuzip format. Below is the command to view compressed file in bzip2 format instead :
bzcat <.tar.bz2 or .bz2 compressed file>
e.g.
bzcat logfile.tar.bz2

Again, if the log file is more then a screen full, use less to pause every screen full.
e.g.
bzcat logfile.tar.bz2 | less

Alternatively, use the "bzless" command. It will also pause every screen full.
bzless <.tar.bz2 or .bz2 compressed file>
e.g.
bzless logfile.tar.bz2

Ciao !!!

No comments: