teh*_*man 0 linux command-line putty command-line-arguments
例如,如果我使用命令:
grep -r "search" *
Run Code Online (Sandbox Code Playgroud)
我可以使用命令将结果输出保存到.txt文件吗?
grep -r "search" * > somefile.txt
Run Code Online (Sandbox Code Playgroud)
顺便说一下,这种重定向并不特定于您正在运行的命令.它是命令shell的一个功能.linux中的标准shell称为bash. man bash应该为您提供比您可能想要的更多信息,但请查看名为REDIRECTION的部分,以全面讨论这些功能.