ID=`ps -ef | grep java | grep apache-tomcat-6.0.35|awk '{print $2}'`
echo $ID
echo "------start---------"
for id in $ID
do
kill -9 $id
echo "killed$id"
done
echo "------end---------"
注:
ID=`ps -ef | grep java | grep apache-tomcat-6.0.35|awk '{print $2}'` 改成自己服务器查 tomcat 进程的指令
ConstXiong 备案号:苏ICP备16009629号-3