> For the complete documentation index, see [llms.txt](https://slackwarecn.gitbook.io/slackbook_cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://slackwarecn.gitbook.io/slackbook_cn/chapter_04/reading_documents.md).

# 阅读文档

传统上，UNIX 和类 UNIX（UNIX-like）的操作系统会产生大量的文件，以供用户在某一时刻查阅。自然，会有很多读取文件的方法，我们在此展示几种最常见的。

早期，如果你想查看文件内容（任何文件，包括文本文件和二进制程序）你需要用到 `cat(1)` 。 `cat` 是个很简单的程序，能接受一个或多个文件，将其连接（连接，con**cat**enate, 因此得名）起来并输出到标准输出（一般是你的终端屏幕）。当文件不大不会刷屏时还好，但不适合阅览大型文件因为它没有内置的文件内跳转的功能，也不能逐段读取。今天，`cat` 依然被广泛使用，但主要用在脚本里来合成文件。

```
darkstar:~$ cat /etc/slackware-version
Slackware 14.0
```

看到 `cat` 的缺点，一些聪明人士坐下来开发一个能一次只读取一页的程序。这种程序被称为“pagers”. 最早的就是 `more(1)`, 因为你能随时看到更多（more）文件内容而得名。


---

# 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://slackwarecn.gitbook.io/slackbook_cn/chapter_04/reading_documents.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.
