ubuntu nohup 进程日志附加而不是替换文件

ubuntu nohup process log append instead of replace file

我读了这个问题 How to get the process ID to kill a nohup process? 答案很棒。但是我需要问一下我是否在这两种情况下都写了两次 "greater than" 字符

nohup my_command >> my.log 2>>&1 &

而不是

nohup my_command > my.log 2>&1 &

它会附加到同一个文件而不是替换它吗?

提前致谢

Use nohup my_command >> my.log 2>&1 & to append the log files.

无需更改2>&1 &,
2>&1 忽略标准输入。
最后&是做你的进程后台。