您的位置:首页 > 其它

将启动命令中包含某个字符串的进行杀死

2016-05-03 23:31 211 查看
[root@dn01 testbash]# ps -ef | grep hello
root     24794  7457  0 11:09 pts/2    00:00:00 sh hello.sh
root     24910  7457  0 11:09 pts/2    00:00:00 sh hello.sh
root     25295  7457  0 11:11 pts/2    00:00:00 grep hello


使用

ps aux | grep hello | grep -v grep |awk '{print $2}'| xargs kill -9


可以将上述的前两个进程杀死
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: