[Techtalk] Kill question
Tabatha Marshall
tabatha at merlinmonroe.com
Thu Sep 18 13:11:45 EST 2003
Well thank you EVERYBODY for the overwhelmingly helpful responses!
We did a little something based on what Tricia wrote, created a
"killevo" command and put in my bin directory:
#!/bin/bash
function kill_name {
ps -aef | grep "$1" | grep "$USER" | awk '{print $"2"}' | xargs kill;
}
kill_name evolution
kill_name gconfd
kill_name bonobo
...And now I can just kill Evolution's other processes after I shut down
the program by using one little command. Works perfectly.
Thanks again to everyone!
Tab
On Thu, 2003-09-18 at 11:47, Bowen, Tricia wrote:
> Here is a little bash function I have in my .bashrc:
>
> function diedie {
> echo "ps -aef | grep "$1" | awk '{print $"2"}' | xargs kill";
> ps -aef | grep "$1" | awk '{print $"2"}' | xargs kill;
> }
>
> Useage:
> diedie java
> That command will kill all your java processes.
>
> --Tricia
>
> -----Original Message-----
> From: Tabatha Marshall [mailto:tabatha at merlinmonroe.com]
> Sent: Thursday, September 18, 2003 2:34 PM
> To: techtalk at linuxchix.org
> Subject: [Techtalk] Kill question
>
>
> Hi folks,
>
> I am trying to find an easier way to kill processes on my system. I
> typically work remotely, accessing my RH8 machine from a WinXP machine,
> and have XDMCP and Cygwin set up. I often just open a shell and ssh
> into the machine to run programs, including X apps.
>
> When I run Evolution from a shell, and then exit, there are always
> processes left over. If I do a quick ps -aux | grep tabatha (my user
> name) and find them, I can kill the pids by listing them with the
> command (ie, kill 111 112 113, etc.) but it's such a pain to type all
> the numbers from the lappie (yeah, I'm lazy).
>
> So if I can locate all the processes running by grepping my username, is
> there any way to kill this way too? We have been reading everything
> over here to find the answer, but just aren't seeing it. If not, are
> there any other ways that might make this easier on me?
>
> Thanks in advance for any help and advice you have!
>
> Tab
--
Tabatha Marshall
Web: www.merlinmonroe.com
Linux Documentation Project Review Coordinator (http://www.tldp.org)
Linux Counter Area Manager US:wa (http://counter.li.org)
More information about the Techtalk
mailing list