I want to kill all processes that I get by:
JavaScript
x
ps aux | grep my_pattern
How to do it?
This does not work:
JavaScript
pkill my_pattern
Advertisement
Answer
Use pkill -f
, which matches the pattern for any part of the command line
JavaScript
pkill -f my_pattern
Just in case it doesn’t work, try to use this one as well:
JavaScript
pkill -9 -f my_pattern