[NTLUG:Discuss] kill command

Leroy Tennison leroy_tennison at prodigy.net
Sat Jun 13 20:46:25 CDT 2009


Val Harris wrote:
> Ralph Green wrote:
>> Howdy,
>>   I tried the following command and it does not quite work, and I don't
>> see why.  Any suggestions?
>>
>> ps -A -o pid -o cmd | grep "update-notifier" | cut -c1-5 | kill
>>
>>  If I do it without that last bit, I get the pid of the process I want
>> to kill.  How do I need to change this to kill that process?  I know it
>> will also get the pid of the grep command and kill that process, but I
>> can't see that that would hurt anything.
>> Good day,
>> Ralph
>>
>>
>>
>> _______________________________________________
>> http://www.ntlug.org/mailman/listinfo/discuss
>>
> 
> assign the pid to a variable, ie: PID and then execute "kill $PID".
> 
Check and see if you have the 'pidof' program, if you do then

kill `pidof update-notifier`

where the "quotes" are actually graves meaning hexadecimal 60.



More information about the Discuss mailing list