[SunHELP] Killing processes Part Deux

Will Mc Donald sunhelp at sunhelp.org
Wed Feb 28 03:01:07 CST 2001


I'm coming late to this thread but I just thought I'd add this, you can get
rid of the grep -v if you do...

ps -ef | grep [f]oo

Something I picked up from the O'Reilly Sysadmin book a while back.

----- Original Message -----
From: "Vinay Bharel" <vinay at bharel.com>
To: <sunhelp at sunhelp.org>
Sent: Tuesday, February 27, 2001 8:38 PM
Subject: Re: [SunHELP] Killing processes Part Deux


> You are making it too complicated. If you want to kill all processes named
> foo, just do...
>
> ps -e | grep foo | grep -v grep | awk '{print $1}' | xargs kill -9
>





More information about the SunHELP mailing list