[Techtalk] Kill question
Luke Woods
lwoods at netstarnetworks.com
Fri Sep 19 04:53:17 EST 2003
On Fri, 2003-09-19 at 04:33, Tabatha Marshall wrote:
> 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!
>
Two options, the first being the ideal;
1) Use skill. skill can kill by a variety of different options including
username.
2) for pid in `ps -aef | grep username | awk '{ print $2 }'`; do kill
$pid; done
Regards,
Luke Woods
More information about the Techtalk
mailing list