1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-21 22:22:07 +02:00
tldr/pages.zh/common/cat.md
2021-03-30 07:31:55 -03:00

510 B

cat

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

  • 以标准输出,打印文件内容:

cat {{file}}

  • 多文件合并到目标文件:

cat {{file1}} {{file2}} > {{target_file}}

  • 多文件合并,并追加到目标文件:

cat {{file1}} {{file2}} >> {{target_file}}

  • 显示行号:

cat -n {{file}}

  • 显示不可打印和空白的字符 (使用M- 前缀标记非ASCII字符):

cat -v -t -e {{file}}