\#加-u 关闭python输出的缓冲
nohup python -u hello.py &

tail nohup.out
\#-f tail不停的实时输出
tail -f nohup.out

nohup python myfile.py > myout.out 2>&1 &

\#nohup的重定向输出到 myout.out


$ nohup python -u myfile.py > myout.out &

\#tail -f 不停的实时输出
$ tail -f myout.out

\#停止运行程序

kill -9 PID

标签: Linux, python, Python, py, nohup, tail, myout

相关文章推荐

添加新评论,含*的栏目为必填