linux常用指令: 后台运行程序,输出重定向

nohup ./nginx 2>&1 >file &

nohup: 忽略 hang up 信号
2>&1 将stderr重定向到stdout

file 相当于 1>file 将stdout重定向到file,
&后台运行

原文地址:https://www.cnblogs.com/ishen/p/12520114.html