Linux One Liner to Kill Multiple Process

Here is the linux one liner to kill multiple process using grep,awk:

ps -aef | grep < process name > |grep -v grep|awk '{print $2}' |xargs kill -9 $2

Here is an example to kill oracle sql client connections via command line: ps -aef | grep LOCAL=NO|grep -v grep|awk '{print $2}' |xargs kill -9 $2

Leave a Reply

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