ubuntu后台执行脚本

nohup python3 cf_threads.py &

ps aux | grep cf_threads.py 使用ps命令与grep一起来搜索脚本名,以确认它是否正在运行:

root@monica:~/chao_code/cf# ps aux | grep cf_threads.py
root     2749473 96.5  1.4  36564 29504 pts/1    R    20:41   0:49 python3 cf_threads.py
root     2749569  0.0  0.0   6436   660 pts/1    S+   20:42   0:00 grep --color=auto cf_threads.py 
posted @ 2024-02-04 20:37  __username  阅读(7)  评论(0编辑  收藏  举报

本文作者:DIVMonster

本文链接:https://www.cnblogs.com/guangzan/p/12886111.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。