ps -ef|grep 进程名称|grep -v grep|awk  '{print "kill -9 " $2}' |sh

 

例如:批量杀死uwsgi进程

ps -ef|grep uwsgi|grep -v grep|awk  '{print "kill -9 " $2}' |sh