[Techtalk] pkill and pgrep - your friends

Magni Onsoien magnio+lc-techtalk at pvv.ntnu.no
Tue May 2 15:57:02 EST 2006


On 2006-05-01 18:31:15 -0700, Kai MacTane said:
> At 05:40 PM 5/1/2006, Val Henson wrote:
> >(and more dangerous) method is the pkill command.  pkill sends the
> >signal to any process with the specified string as part of the process
> >name.
> 
> I generally use killall for essentially the same thing. However...

Using killall is a Bad Habit if you are using Solaris (including if you
are ever going to be using it). 'killall ssh' will NOT kill just ssh -
the only argument used with killall in Solaris is the signal name...
Yes, it will kill every process and then shut down your system.
(It only works as root, though.)

(For some reason I have never learned this the hard way. But I have been
watching it.)


Magni :)
-- 
sash is very good for you.


More information about the Techtalk mailing list