Re: Killing process with more than one day
- From: apogeusistemas@xxxxxxxxx
- Date: Fri, 20 Jun 2008 09:29:34 -0700 (PDT)
On Jun 20, 10:40 am, newhorizon <mehmete...@xxxxxxxxx> wrote:
you can process output of
"ps "
to find the processes ids that are older than one day (you can use
"awk" for that )
then you can kill them :)
but why do you wanna kill the processes older than one day you may
kill system processes as well ?
Thank you, I create this script below :
ps -ef | grep -v grep | grep deport > /tmp/killpr.txt
while read a b c d e f g h i j k l m n o p q r s
do
process=`echo $e | awk '{print length}'`
if [ $process -eq 3 ]
then
echo "$b $e"
kill -9 $b
fi
done < /tmp/killpr.txt
.
- Follow-Ups:
- Re: Killing process with more than one day
- From: Maxwell Lol
- Re: Killing process with more than one day
- From: Bill Marcum
- Re: Killing process with more than one day
- References:
- Killing process with more than one day
- From: apogeusistemas
- Re: Killing process with more than one day
- From: newhorizon
- Killing process with more than one day
- Prev by Date: Re: Logical AND with regular expression
- Next by Date: Re: Killing process with more than one day
- Previous by thread: Re: Killing process with more than one day
- Next by thread: Re: Killing process with more than one day
- Index(es):
Relevant Pages
|