nohup
2018-11-12 本文已影响2人
苏牧传媒
后台运行:
nohup command &
nohup输出:
nohup command > myout.file 2>&1 &

查看:
jobs
查看任务:
ps -aux|grep bismark
a:显示所有程序
u:以用户为主的格式来显示
x:显示所有程序,不以终端机来区分

用grep -v参数可以将grep命令排除掉
ps -aux|grep chat.js| grep -v grep
再用awk提取一下进程ID
ps -aux|grep chat.js| grep -v grep | awk '{print $2}'
终止后台运行的进程
kill -9 进程号