MENU

linux根据关键字批量kill进程

August 11, 2021 • 折腾阅读设置

问题:需要把多余的带有“cpulimit”关键字的进程批量kill掉
解决:命令如下
ps -ef | grep cpulimit | grep -v grep | awk '{print $2}'|xargs kill -9
归纳:
ps aux 查看进程
ps -ef | grep 关键字替换成你的 | grep -v grep | awk '{print $2}'|xargs kill -9

Last Modified: August 19, 2021
Archives QR Code Tip
QR Code for this page
Tipping QR Code