Łukasz Lew Łukasz Lew - 1 year ago 112
Linux Question

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

How to do it?

This does not work:

pkill my_pattern

Answer Source

Use pkill -f, which matches the pattern for any part of the command line

pkill -f my_pattern
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download