For*_*ail 1 linux command-line-interface
在 linux CLI 上:我有 3 天的运行扫描,我通过管道传输到文件(我知道,应该让它在内部写入文件)。
这让我想到了我的问题,说我有一个命令
long_process_here > output.txt
有没有办法在进程仍在运行时显示或输出该信息?将内存中的内容通过管道传输到屏幕?
有一个名为的程序tee将输入写入文件,因为它在屏幕上输出它:
long_process_here | tee output.txt
Run Code Online (Sandbox Code Playgroud)
现在您已经运行了程序,您可以使用tail“跟随”输出文件并在添加新行时输出它们:
tail -f output.txt
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
509 次 |
| 最近记录: |