Linux command
zmore 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
View a compressed file
zmore [file.gz]
View with a specific number
zmore -[20] [file.gz]
Display helpful prompts
zmore -d [file.gz]
Squeeze multiple blank lines
zmore -s [file.gz]
Start at first occurrence
zmore +/[pattern] [file.gz]
说明
zmore is a pager for viewing compressed text files one screen at a time. It works with files compressed using gzip, compress, or pack, and also handles uncompressed files. If a file doesn't exist, zmore automatically looks for versions with .gz, .z, or .Z extensions. The command combines decompression with the more pager, displaying --More-- at the bottom of each screenful. Press space to advance one screen, Enter for one line, or q to quit. When output is not a terminal, zmore behaves like zcat, decompressing to stdout.
参数
- -_number_
- Number of lines per screen
- -d
- Display helpful messages instead of ringing bell on errors
- -f
- Count logical lines rather than screen lines (long lines not folded)
- -l
- Do not pause after form feed characters
- -s
- Squeeze consecutive blank lines into one
- +_linenum_
- Start at specified line number
- +/_pattern_
- Start two lines before first match of pattern
FAQ
What is the zmore command used for?
zmore is a pager for viewing compressed text files one screen at a time. It works with files compressed using gzip, compress, or pack, and also handles uncompressed files. If a file doesn't exist, zmore automatically looks for versions with .gz, .z, or .Z extensions. The command combines decompression with the more pager, displaying --More-- at the bottom of each screenful. Press space to advance one screen, Enter for one line, or q to quit. When output is not a terminal, zmore behaves like zcat, decompressing to stdout.
How do I run a basic zmore example?
Run `zmore [file.gz]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -_number_ do in zmore?
Number of lines per screen