正文
linux后台执行python脚本
nohup python3 test.py > test.log 2>&1 &
nohup python3 test.py > test2.log 2>&1 &
tail test.log -n 101
查看python脚本后台
ps -ef | grep python
kill -9 进程id
###结束指定名称进程
ps -ef|grep test.py|grep -v grep|awk '{print "kill -9 "$2}'|sh
- 上一篇: Ubuntu安装Python3.9
- 下一篇: Debian安装Squid代理服务器
猜你喜欢
- 2024-01-08python脚本检测出现指定标题窗口并点击鼠标
- 2024-01-08python推送钉钉群消息
- 2024-01-03Ubuntu安装Python3.9
- 搜索