> For the complete documentation index, see [llms.txt](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/08.0.md).

# 8 Go UNIX系统编程

上一章，我们讨论了两个高级的，但有点偏理论的 Go 主题：接口和反射。这章的代码只是理论性的。

因为这章的主题是**系统编程**，毕竟 Go 是一门严格的系统编程语言；它的创造者不满意于他们编写系统软件所选择的语言，所以它们决定创造一门新的编程语言。

> *如果您真的对用 Go做 **系统编程**感兴趣，那么 2017 出版的《Go 系统编程》绝对可以帮助到您。但是，这章包含到一些有趣并有点高级的主题没有出现在我的《Go 系统编程》这本书中*

《玩转 Go》的这章，您会了解到如下主题：

* Unix 进程
* `flag` 包
* `io.Reader`和`io.Writer` 接口的使用
* 用 Go 的 `os/signal` 包处理 Unix **信号**
* 在您的 Unix 系统工具中支持 Unix **管道**
* 读取文本文件
* 读取 CSV 文件
* 写入文件
* `bytes` 包
* `syscall` 包的进阶使用
* 遍历目录结构
* Unix 文件权限


---

# 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:

```
GET https://wskdsgcf.gitbook.io/mastering-go-zh-cn/08.0.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
