Centos7系统批量kill进程命令
1. 查找出系统运行的进程中包含nginx关键字的进程
ps -ef | grep nginx | grep -v grep
2. 后面加上|sh后,则执行这条命令,杀掉这些进程
ps -ef | grep nginx | grep -v grep | awk '{print "kill -9 "$2}' | sh
You have a dream, you got to protect it.
1. 查找出系统运行的进程中包含nginx关键字的进程
ps -ef | grep nginx | grep -v grep
2. 后面加上|sh后,则执行这条命令,杀掉这些进程
ps -ef | grep nginx | grep -v grep | awk '{print "kill -9 "$2}' | sh