Linux: Kill and Grep

Advertisements

I find these commands useful to kill all processes running from a given script or have the same process name:

kill -9 `ps -ef | grep scriptname.sh | grep -v grep | awk ‘{print $2}’`

kill -9 `ps -ef | grep pdksh | grep -v grep | awk ‘{print $2}’`

 

[ad#ad-post]

Advertisements

Add a Comment

Your email address will not be published. Required fields are marked *

(adsbygoogle = window.adsbygoogle || []).push({});