Re: Getting a PID and killing a process
Re: Getting a PID and killing a process
- Subject: Re: Getting a PID and killing a process
- From: John W Baxter <email@hidden>
- Date: Sat, 16 Mar 2002 19:02:02 -0800
At 3:04 +0100 3/17/2002, Hiram wrote:
>
On Sunday, March 17, 2002, at 01:42 , JollyRoger wrote:
>
>
> kill `ps uwax | grep wget| grep -v grep | awk {'print $2'}`
>
>
Thanks! This worked just fine. I had to add a -w option to avoid
>
killing not only wget but my own app (wgetCocoa) as well, but then it
>
was done.
>
>
I think I should learn more about those commands you used (awk, uwax);
>
without those, obviously, this kind of thing can't be done.
The command is ps, the uwax (which I habitually type as auxw) is flags for
the ps program.
"But," says you, "flags follow a -."
"Well, yes," says I, "usually. But for ps, the - has been nuked (it was
still required by the first ps I used). And, for some versions of ps, some
of the flags have slightly different meanings with and without the -. And
some versions complain about the presence of the - and then do their thing
anyhow."
See
man ps
for what the flags do.
OK...a is display information about other users' processes in addition to
your own;
u controls what columns are output
x adds output from processes which don't have "controlling terminals"
(don't ask)
w is wide output (which here makes room for the command names)...an
additional w widens the output som more, and so on [it must stop sometime]
See man ps for the details (and many more flags).
--John
--
John Baxter email@hidden Port Ludlow, WA, USA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.