1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages.zh/linux/cat.md
Managor a70b923d8f
*: add option placeholders to translations (#15933)
Co-authored-by: Darío Hereñú <magallania@gmail.com>
2025-03-19 00:36:34 +02:00

762 B

cat

打印和连接文件。 更多信息:https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html.

  • 将文件内容打印到 stdout

cat {{路径/到/文件}}

  • 将多个文件连接到一个输出文件:

cat {{路径/到/文件1 路径/到/文件2 ...}} > {{路径/到/输出文件}}

  • 将多个文件附加到输出文件:

cat {{路径/到/文件1 路径/到/文件2 ...}} >> {{路径/到/输出文件}}

  • stdin 写入文件:

cat - > {{路径/到/文件}}

  • 显示带有行号的所有行:

cat {{[-n|--number]}} {{路径/到/文件}}

  • 显示不可打印字符和空白字符(如果非 ASCII,则带有 M- 前缀):

cat {{[-vte|--show-nonprinting -t -e]}} {{路径/到/文件}}