1

我在 Amazon Web Service shell 上运行一个很长的 python 进程,说它是

python sample.py

当我退出 shell 时,它会终止进程,所以我尝试将它放在后台使用nohup python &.

我退出了 shell,当我回来时,我输入ps -ef | grep python了 ,进程仍然存在,但是它不再打印任何输出(作业继续写入输出)。我试过fg <job_number>了,我得到了“没有这样的工作”。

结果ps -ef | grep python

ubuntu    2433     1 81 02:55 ?        00:01:53 python sample.py

进程还在运行吗?我如何继续检查它的输出?

4

0 回答 0