Files
tldr/pages.zh/common/cat.md
2024-10-02 01:47:04 -07:00

25 lines
598 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# cat
> 打印和连接文件。
> 更多信息:<https://manned.org/cat.1posix>.
- 将文件内容打印到 `标准输出`
`cat {{路径/到/文件}}`
- 将多个文件连接成一个输出文件:
`cat {{路径/到/文件1 路径/到/文件2 ...}} > {{路径/到/输出文件}}`
- 将多个文件追加到一个输出文件中:
`cat {{路径/到/文件1 路径/到/文件2 ...}} >> {{路径/到/输出文件}}`
- 无缓冲地将文件内容复制到输出文件中:
`cat -u {{/dev/tty12}} > {{/dev/tty13}}`
-`标准输入` 写入文件:
`cat - > {{路径/到/文件}}`