ps和kill联合起来查杀进程

ps -aux | grep php-fpm | awk '{print $2}'  |xargs  kill -s SIGKILL

xargs build and execute command lines from standard input
   把前面命令的输出结果(PID)作为“kill -s 9”命令的参数

猜你喜欢

转载自blog.csdn.net/magaiou/article/details/80322269