[geeks] Killing process by name with cron.

David Cantrell geeks at sunhelp.org
Sun Jul 22 14:10:06 CDT 2001


On Sun, Jul 22, 2001 at 10:54:28AM -0700, William S. wrote:

> Is there any script I can write that can kill the
> process by name?

As discussed in {geeks|rescue} passim, some systems have a 'killall'
command which does this, but failing that, try something like:

kill `ps a|awk '/PROCESSNAME/ { print $1 }'`

-- 
David Cantrell | david at cantrell.org.uk | http://www.cantrell.org.uk/david

Do not be afraid of cooking, as your ingredients will know and misbehave
   -- Fergus Henderson



More information about the geeks mailing list