Linux杀死指定名字线程

#!/bin/sh


result=`ps -ef|grep 'python **updatelaw.py'|grep -v 'grep'|awk '{print $2}'`


if [ -z "$result" ]
then
echo "Not Python Spider,But Ant would continue!Blacklist-updatelaw"
else
ps -ef|grep '**python **updatelaw.py'|grep -v 'grep'|awk '{print $2}'|xargs kill -9
echo "Killed $result"
fi


杀死指定名字线程

ps -ef|grep '**XXXXXX**'|grep -v 'grep'|awk '{print $2}'|xargs kill -9
**少一个也不行
阅读更多
换一批

没有更多推荐了,返回首页