基本命令
nohup command &
例子
nohup python data.py > myout.file 2>&1 &
> 重定向
myout.file 日志存放位置
2>&1 将标准出错重定向到标准输出,这里是指标准输出已经重定向到myout.file文件
& 让该命令在后台执行
运行后查看进程
jobs -l
终止进程
kill -9 进程ID
kill -9 -l 终止所有的进程
基本命令
nohup command &
例子
nohup python data.py > myout.file 2>&1 &
> 重定向
myout.file 日志存放位置
2>&1 将标准出错重定向到标准输出,这里是指标准输出已经重定向到myout.file文件
& 让该命令在后台执行
运行后查看进程
jobs -l
终止进程
kill -9 进程ID
kill -9 -l 终止所有的进程