[HOW TO] view log files *.bz2

In a few time, you need to read log file format bz2. This article explain 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

0 nhận xét:

Post a Comment