I need to kill a few Python processes. I can get a list of the process numbers using pgrep python, but how can I kill them all at once instead of killing one by one?
I'm looking for something like:
pgrep python | kill process_nos
You can try:
pgrep python | xargs kill
Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).
Short and sweet, man pkill for details.
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
5 months ago