This code on linux will kill all procs with name proc_name besides myself (if I have that name ==> the grep -v $$)
- Code: Select all
sudo kill -9 $(ps -ef | grep 'proc_name' | grep -v grep | grep -v $$ | awk '{print $2}')
This is tested in bash shell
Karl