Re: To kill all processes except mine -- Linux
From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Fri, 6 Nov 2009 14:09:33 +0000 (UTC)
Message-ID: <hd1amt$irl$1_at_solani.org>
On Fri, 06 Nov 2009 13:39:13 +0000, Mladen Gogala wrote:
>> Hi all,
>>
>> I wanted to kill all process of one user except mine.Normally i use to
>> kill all the sessions using
>> this command
>>
>> kill -9 -1
>>
>> But this command will also kills even my process too . But i dont this
>> too happen.
>>
>> 2. How to find parent process and child process .
>>
>> Regards
>>
>> Ram
>
> ps -fu oracle|awk '{ print $2; }'|grep -v $$|xargs kill -9
Date: Fri, 6 Nov 2009 14:09:33 +0000 (UTC)
Message-ID: <hd1amt$irl$1_at_solani.org>
On Fri, 06 Nov 2009 13:39:13 +0000, Mladen Gogala wrote:
> On Fri, 06 Nov 2009 00:14:18 -0800, Ram wrote: >
>> Hi all,
>>
>> I wanted to kill all process of one user except mine.Normally i use to
>> kill all the sessions using
>> this command
>>
>> kill -9 -1
>>
>> But this command will also kills even my process too . But i dont this
>> too happen.
>>
>> 2. How to find parent process and child process .
>>
>> Regards
>>
>> Ram
>
> ps -fu oracle|awk '{ print $2; }'|grep -v $$|xargs kill -9
Alternatively, on Linux:
pgrep -u oracle|grep -v $$
-- http://mgogala.freehostia.comReceived on Fri Nov 06 2009 - 08:09:33 CST