如何杀死具有给定部分名称的所有进程? [英] How to kill all processes with a given partial name?
本文介绍了如何杀死具有给定部分名称的所有进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想杀死我得到的所有进程:
I want to kill all processes that I get by:
ps aux | grep my_pattern
怎么做?
这不起作用:
pkill my_pattern
推荐答案
使用 pkill -f
,匹配命令行任何部分的模式
Use pkill -f
, which matches the pattern for any part of the command line
pkill -f my_pattern
以防万一它不起作用,也尝试使用这个:
Just in case it doesn't work, try to use this one as well:
pkill -9 -f my_pattern
这篇关于如何杀死具有给定部分名称的所有进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文