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

nohup ./nginx 2>&1 >file &

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

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

posted @ 2020-03-18 20:52  woder  阅读(685)  评论(0编辑  收藏  举报