use*_*049 4 linux console nohup output
我在我的项目中使用 nohup。在使用 nohup 时,是否有可能将程序的输出同时发送到控制台和文件?
使用“tee”我没有成功:
nohup ./programm 2>&1 | tee Output.txt
Run Code Online (Sandbox Code Playgroud)
感谢帮助
试试这个来运行并将输出记录在文件中。
nohup ./program > Output.txt | tail -F Output.txt &
Run Code Online (Sandbox Code Playgroud)
如果你想在后台运行它:
nohup ./program > Output.txt &
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15222 次 |
| 最近记录: |