[Techtalk] Kill question

Bowen, Tricia tbowen at CapitalThinking.com
Thu Sep 18 14:47:02 EST 2003


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)

_______________________________________________
Techtalk mailing list
Techtalk at linuxchix.org
http://mailman.linuxchix.org/mailman/listinfo/techtalk


More information about the Techtalk mailing list