> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man1/zmore.1.md).

# zless.1

`zmore` — 查看压缩文件

## 名称

`zmore`, `zless`

## 概要

`zmore [flags] [file]`

`zless [flags] [file]`

## 描述

`zless` 是一个过滤器，允许查看使用 Lempel-Ziv 编码压缩的文件。此类文件通常具有 "Z" 或 "gz" 扩展名（同时支持 compress(1) 和 [gzip(1)](/man/man1/gzip.1.md) 格式）。指定的任何 `flags` 都会传递给用户首选的 `PAGER`（默认为 **/usr/bin/more**）。

`zless` 等同于 `zmore`，但使用 [less(1)](/man/man1/less.1.md) 作为分页器，而非 more(1)。

当指定多个文件时，`zmore` 会在每个文件结束时暂停，并向用户显示以下提示：

```sh
prev_file (END) - Next: next_file
```

其中 **prev\_file** 是刚刚显示的文件，**next\_file** 是下一个要显示的文件。提示时识别以下按键：

**`e`** 或 `q` 退出 `zmore`。

**`s`** 跳过下一个文件（如果下一个文件是最后一个，则退出）。

如果未指定文件，`zmore` 将从标准输入读取。在此模式下，`zmore` 会假定使用 [gzip(1)](/man/man1/gzip.1.md) 风格的压缩，因为没有可据以判断的后缀。

## 环境变量

**`PAGER`** 用于显示文件的程序。如果未设置，则使用 **/usr/bin/more**（`zmore`）或 **/usr/bin/less**（`zless`）。

## 参见

compress(1), [less(1)](/man/man1/less.1.md), more(1)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man1/zmore.1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
