LINUX 常用命令


后台执行程序

nohup python dingding_for_safe.py > run.log 2>&1 &

查看后台程序

ps aux |grep "test.sh" #a:显示所有程序 u:以用户为主的格式来显示 x:显示所有程序,不以终端机来区分 ps -ef |grep "test.sh" #-e显示所有进程。-f全格式。

关闭后台程序

kill 1001 kill -9 1001 #-9表示强制关闭