bash - 将 nohup 的标准错误重定向到 nohup.out

标签 bash shell stdout stderr nohup

如何使用 nohup 运行命令,以便 stdout 和 stderr 都保存到 nohup.out?默认情况下只保存 stdout 而丢弃 stderr。

最佳答案

试试这个

nohup 2>&1 Ex.exe &

关于bash - 将 nohup 的标准错误重定向到 nohup.out,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12820616/

相关文章:

linux - 将参数以 txt 文件的形式传递到 shell 脚本中

linux - 为什么它不起作用?如果bash中的指令

string - csh 上的自连接字符串

linux - 需要一些帮助编写 shell 脚本来添加数字

bash - 为什么管道重置当前工作目录?

windows - 如何在 Windows 下将 stdout 和 stderr freopen() 到一个输出文件中

linux - 如何使用 awk 在模式后添加多行

linux - stdin、stdout、stderr在linux中究竟是如何实现的?

Perl 脚本用于记录外部可执行文件输出和错误,同时仍在运行

bash - 生成文件中的链命令通过IP连接到postgres容器