[Techtalk] Kill question

Telsa Gwynne hobbit at aloss.ukuu.org.uk
Wed Sep 24 13:15:06 EST 2003


On Wed, Sep 24, 2003 at 12:35:53PM +0200 or thereabouts, Gina Lanik wrote:
> On Thu, Sep 18, 2003 at 01:11:45PM -0700, Tabatha Marshall wrote:
> > We did a little something based on what Tricia wrote, created a
> > "killevo" command and put in my bin directory:
> > 
> > #!/bin/bash
> > function kill_name {
> >    ps -aef | grep "$1" | grep "$USER" | awk '{print $"2"}' | xargs kill;
> > }
> > 
> > kill_name evolution
> > kill_name gconfd
> > kill_name bonobo
>             ^^^^^^
> Since you know the names of the programms you want to kill you might also
> want to look into 'killall'.

Just a note, because I habitually post this every so often on
the Gnome-related lists, too. (Where Linux users occasionally
advise it without checking what OS the person is running Gnome
on, or without realising it's on Solaris.)

killall does very different things on Linux and on Solaris. On
Solaris it is much more literal. It kills all. Regardless of what
you put after it on the command line.

:)

So I realise this is not an issue for the original question,
but it's one of those useful bits of trivia which might occasionally
have a use.

Telsa



More information about the Techtalk mailing list