Skip to content

Saving output to files · ⁨把输出保存到文件⁩

English

Catching the output

  • Normally a command's output appears on screen. The > symbol redirects it into a file instead:
  • Nothing prints — the text went into greeting.txt. Read it back with cat greeting.txt.

中文

捕获输出

  • 通常命令的输出会显示在屏幕上。> 符号会把它重定向到一个文件里:
echo hello > greeting.txt
  • 屏幕上什么都不打印 —— 文字进到了 greeting.txt 里面。用 cat greeting.txt 把它读回来。

>  把命令的输出送进文件,而不是屏幕

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩