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>
bzcat logfile.tar.bz2

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

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

Ciao !!!

No comments: