Re: [Hampshire] constantly flickering LEDs on router: Solved…

Top Page

Reply to this message
Author: Victor Churchill
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] constantly flickering LEDs on router: Solved - amid blushes
2009/5/18 Andy Smith <andy@???>:
> Hi Victor,
>
> On Mon, May 18, 2009 at 10:35:43AM +0100, Victor Churchill wrote:
>> I have had to do such things that many times that I came up with a one liner :
>>
>>  ps -eafw | grep morituri | awk '{print $2}' |  xargs kill
>>
>> Disclaimers:
>> Different people have different favourite 'ps' invocations embedded in
>> their finger memories. The above is mine.
>> A purist would say there should be a 'grep -v grep |' in the pipeline
>> as well. A /real/ purist would say there shouldn't and that there
>> should be one grep with a regex.
>
> Someone else would use pkill instead of the lot of it. ;)


"Back In The Day, we had to make our own pkills... these young
whipper snappers..." ;-)

Semi seriously though: I do notice how as new releases come around, if
one has come from a previous release there is probably a tendency to
stick with the familiar way even if there are new easier ways. I've
not come across pkill (probably 'cos I've never looked for it because
I roll my own ;-)
I tried killall but did not get on with it because at the time it
seemed to be sensitive to the path name so 'killall foo' would not
work if what was running was '/usr/floop/blah/foo'. Maybe the way I
was driving it.