alphanumeric alphanumeric - 4 years ago 104
Bash Question

OSX Terminal: How to kill all processes with the same name

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)

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

Answer Source

use pkill, with the -f option.

pkill -f python

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download