lzmore
View compressed files one screen at a time
TLDR
View documentation for the original command
SYNOPSIS
lzmore [more-options] [file...]
lzmore [more-options]
PARAMETERS
-num
Displays num lines at a time. For example, -20 displays 20 lines per screen.
-d
Prompts with `[Press space to continue, 'q' to quit.]` and `[Press 'h' for help]` messages instead of ringing the bell when waiting for user input.
-f
Counts logical lines rather than screen lines, meaning long lines are not folded (wrapped) when determining screen size.
-l
Suppresses the pause after a form feed (Ctrl+L) character is encountered in the input.
-s
Squeezes multiple consecutive blank lines into a single blank line, useful for cleaning up formatted text.
-u
Suppresses underlining, which can be useful on terminals that don't support it well or when it interferes with readability.
-c
Does not scroll; instead, it redraws the screen from the top, which can prevent flicker on some terminals.
+/pattern
Starts displaying output two lines before the first occurrence of the specified pattern in the file.
+num
Starts displaying at line number num of the file.
file...
One or more LZMA or XZ compressed files to view. If multiple files are given, lzmore displays them one after another.
DESCRIPTION
lzmore is a convenient shell script that allows users to view the content of compressed files (using LZMA or XZ compression algorithms) without explicitly decompressing them first. It acts as a wrapper around the xz (or unlzma) decompression utility and the more pager. When invoked, lzmore decompresses the specified file(s) on-the-fly and pipes the output to more, enabling a page-by-page viewing experience. This is particularly useful for quickly inspecting large compressed logs or data files without consuming large amounts of disk space for temporary uncompressed versions. If no file is specified, lzmore reads from standard input.
CAVEATS
lzmore is a wrapper script, so its functionality depends on the underlying xz decompression utility and the more pager being available on the system. It is designed for sequential viewing and does not support random access or backward scrolling within the compressed data. For more advanced features like backward scrolling or searching, consider using lzless or piping xz output to less directly.
READING FROM STANDARD INPUT
If no file argument is provided, lzmore reads from standard input, allowing it to be used efficiently in pipelines (e.g., `cat file.lzma | lzmore` or `curl example.com/log.xz | lzmore`).
EXIT STATUS
lzmore typically exits with the exit status of the underlying more command. A status of 0 usually indicates success, while a non-zero status indicates an error during decompression or paging.
HISTORY
The concept of 'more' tools for compressed files emerged with the popularization of compression utilities like gzip (leading to zmore) and bzip2 (leading to bzmore). As LZMA and later XZ compression gained prominence for their high compression ratios and integrity checking, lzmore was developed as part of the xz-utils package to provide a similar convenient viewing mechanism for these new formats. It follows the established pattern of integrating decompression on-the-fly with a pager, providing a seamless user experience.