ps -ef|grep xxx|grep -v grep|cut -c 7-15|xargs kill –9
[email protected]:~# ps -ef|grep dz2crm
root 2296 1 0 Apr29 ? 00:01:23 php /var/www/dezhi/application/mq_worker/dz2crm.php
root 8037 1 0 May13 ? 00:00:38 php /var/www/dezhi/application/mq_worker/dz2crm.php
root 8136 1 0 May13 ? 00:00:39 php /var/www/dezhi/application/mq_worker/dz2crm.php
root 16163 16097 0 15:37 pts/0 00:00:00 grep --color=auto dz2crm
root 20636 1 0 May12 ? 00:00:41 php /var/www/dezhi/application/mq_worker/dz2crm.php
ubuntu 27456 1 0 May15 ? 00:00:32 php /var/www/dezhi/application/mq_worker/dz2crm.php
ubuntu 32023 1 0 May15 ? 00:00:33 php /var/www/dezhi/application/mq_worker/dz2crm.php
[email protected]:~# ps -ef|grep dz2crm|grep -v grep|cut -c 7-15|xargs kill -9
[email protected]:~# ps -ef|grep dz2crm
root 16310 16097 0 15:40 pts/0 00:00:00 grep --color=auto dz2crm