1. 查找出系统运行的进程中包含nginx关键字的进程
ps -ef | grep nginx | grep -v grep
2. 后面加上|sh后,则执行这条命令,杀掉这些进程
ps -ef | grep nginx | grep -v grep | awk '{print "kill -9 "$2}' | sh
标签:ps,grep,批量,ef,Centos7,nginx,kill,进程
来源: https://www.cnblogs.com/WinterPasser/p/16521035.html