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
本文来自博客园,作者:__username,转载请注明原文链接:https://www.cnblogs.com/code3/p/18006955