zmore for bzip2?

Chuck Swiger cswiger at
Sat Aug 30 09:21:49 PDT 2003

David Kelly wrote:
[ ... ]
> Yes, of course. But zmore is smart enough to figure out what to do with
> several compression techniques, or even to handle non-compressed files
> very trivially and without hassle.

'zmore' is a simple shell script which calls "gzcat | ${PAGER-more}".  One 
solution to your problem, or at least a solution, would be to change zmore to 
look for a trailing bz/bz2 or invoke bzcat instead.  Another would be to change 
the sources of gzip to recognize the bzip2 magic files bytes, extending the 
detection of gzip versus classic LZH used by compress.

Compression formats are similar to graphic image formats in the PBMPLUS sense.


More information about the freebsd-questions mailing list