LinuxCommandLibrary

bzless

View bzip2 compressed files without decompressing

SYNOPSIS

bzless [options] file1 file2 ...

PARAMETERS

file1 file2 ...
    One or more bzip2 compressed files to view.

-?
    Display a help message.

-V
    Display version information.

-[less options]
    Any valid option accepted by less can be passed to bzless and will be passed through to the less program. Consult the less(1) manual page for a complete listing of options.

DESCRIPTION

The bzless command is a Linux utility that allows you to view the contents of bzip2-compressed text files, one screenful (or windowful) at a time. It is essentially a combination of the bzip2 -dc command (which decompresses a bzip2 archive to standard output) piped into the less command (a pager). This allows users to easily inspect the contents of compressed files without having to decompress them to disk first. bzless is particularly useful when dealing with large log files, archives, or other text-based data that has been compressed to save space. It inherits most of the functionality and options of the less command for navigation and searching within the file. It is typically included in the bzip2 package on most Linux distributions. The command is a convenience wrapper, saving the user from manually creating the pipe between decompression and paging.
Note: The command will use your default pager configured on your system.

CAVEATS

bzless relies on the less program being installed and properly configured. If less is not available, bzless may not function correctly or at all. Errors in the bzip2 archive could cause issues when decompressing.

ALTERNATIVES

You can achieve the same result by using bzip2 -dc file.bz2 | less, but bzless simplifies this process.

SEE ALSO

bzip2(1), bzcat(1), less(1), gzip(1), zless(1)

Copied to clipboard