如何使用OS X Terminal杀死具有相同名称的所有进程 [英] How to kill all processes with the same name using OS X Terminal

查看:102
本文介绍了如何使用OS X Terminal杀死具有相同名称的所有进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从运行此命令获取以下输出:

Getting the following output from running this:

ps aux | grep Python

输出:

user_name  84487   0.0  0.0        0      0   ??  Z    12:15PM   0:00.00 (Python)
user_name  84535   0.0  0.0        0      0   ??  Z    12:16PM   0:00.00 (Python)

我想终止计算机上当前正在运行的所有Python进程....

I want to terminate all Python processes currently running on a machine....

推荐答案

使用 pkill -f选项.

pkill -f python

如果您尚未预安装pkill(某些osx尚未...),请尝试 proctools .

If you don't have pkill pre-installed (some osx's don't...), try proctools.

这篇关于如何使用OS X Terminal杀死具有相同名称的所有进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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