Linux 批量殺死進程

ps -ef | grep module- | grep -v module-mxm | cut -c 9-15 | xargs kill -9進程

ps -aux |egrep "(analysis.jar|comm.jar|xpush.jar|customer.jar|track.jar|manage.jar|org.jar|product.jar|program.jar|xschedule.jar|xim.jar)" | cut -c 9-15 | xargs kill -9module

ps -A | grep module- | cut -c 1-5 | xargs kill -9grep

 

 

ps -ef | grep module-  im

查找關鍵字包含module-的全部進程co

 

grep -v module-mxm字符

排除module-mxm的進程push

 

cut -c 9-15ps

截取第9至15字符(進程id)參數

 

xargs kill -9

將截取的9-15字符(進程id)做爲kill -9 後的參數。

相關文章
相關標籤/搜索