如何杀死一个给定的部分名称的所有进程? [英] How to kill all processes with a given partial name?

查看:95
本文介绍了如何杀死一个给定的部分名称的所有进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要杀死我得到的所有进程:

 的ps aux | grep的my_pattern

怎么办呢?

这不工作:

  pkill的my_pattern


解决方案

使用 pkill的-f ,它匹配的模式在命令行的任何部分。

  pkill的-f my_pattern

I want to kill all processes that I get by:

ps aux | grep my_pattern

How to do it?

This does not work:

pkill my_pattern

解决方案

Use pkill -f, which matches the pattern for any part of the command line

pkill -f my_pattern

这篇关于如何杀死一个给定的部分名称的所有进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆