Getting the following output from running this:
ps aux | grep Python
Output:
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....
Will do the trick.
@shx2: Thanks for the trick! Here are the steps to make it work:
Step1:
Step2:
Step3: With textEditor of your choice open the file you just created: /usr/bin/pkill (do it with sudo or be Admin). Copy/paste this and save:
Step3: Set file attribute
Now you ready to terminate any process using a simple syntax:
For example, to terminate all Python processes open a shell and type:
All python processes should be gone by now.
use pkill, with the
-f
option.If you don't have
pkill
pre-installed (some osx's don't...), try proctools.If you don't have
pkill
, you can try this:If that gives you the PIDs you want to kill, join that up with the kill command like this
That says... kill all the PIDs that result from the command in parentheses.