Mailinglist Archive: opensuse (5100 mails)
| < Previous | Next > |
Re: [SLE] How to find PID
- From: Jostein Berntsen <jbernts@xxxxxxxxxxxx>
- Date: Wed, 2 Jun 2004 15:07:32 +0200
- Message-id: <20040602130731.GE2587@xxxxxxxx>
On 01.06.04,11:29, C Hamel wrote:
> Is there an easy way to check for an application's PID# & kill it using a
> script?
> --
I like this way:
#!/bin/sh
while true
do
kill -9 `ps aux | grep -i $1 | awk '{ print $2 }'` sleep 2
done
put this in a script called kl. And run for ex. 'kl mozilla' when it
gets to heavy.
- Jostein
--
Jostein Berntsen <jbernts@xxxxxxxxxxxx>
> Is there an easy way to check for an application's PID# & kill it using a
> script?
> --
I like this way:
#!/bin/sh
while true
do
kill -9 `ps aux | grep -i $1 | awk '{ print $2 }'` sleep 2
done
put this in a script called kl. And run for ex. 'kl mozilla' when it
gets to heavy.
- Jostein
--
Jostein Berntsen <jbernts@xxxxxxxxxxxx>
| < Previous | Next > |