Re: current pids per tty

2012-04-04 Thread perryh
ill...@gmail.com ill...@gmail.com wrote: (there is an executable named /usr/bin/jobs, but . . . well run cat /usr/bin/jobs see for yourself). Whoa! Does /usr/bin/jobs even work? $ cat /usr/bin/jobs #!/bin/sh # $FreeBSD: src/usr.bin/alias/generic.sh,v 1.2.10.1.4.1 2010/06/14 02:09:06

Re: current pids per tty

2012-04-04 Thread Ian Smith
In freebsd-questions Digest, Vol 409, Issue 5, Message: 3 On Wed, 04 Apr 2012 08:03:11 -0700, per...@pluto.rain.com wrote: ill...@gmail.com ill...@gmail.com wrote: (there is an executable named /usr/bin/jobs, but . . . well run cat /usr/bin/jobs see for yourself). Whoa! Does

Re: current pids per tty

2012-04-03 Thread ill...@gmail.com
On 3 April 2012 04:19, takCoder tak.offic...@gmail.com wrote: Hi Everyone, i'm trying to find out a way to list *all* the pids of which running in the background of or as the parent *of the current tty* device my shell file is running on.. is there a quick way to find it out as for commands

Re: current pids per tty

2012-04-03 Thread Matthew Story
On Tue, Apr 3, 2012 at 12:33 PM, ill...@gmail.com ill...@gmail.com wrote: On 3 April 2012 04:19, takCoder tak.offic...@gmail.com wrote: Hi Everyone, i'm trying to find out a way to list *all* the pids of which running in the background of or as the parent *of the current tty* device my

Re: current pids per tty

2012-04-03 Thread Polytropon
On Tue, 3 Apr 2012 16:47:57 -0400, Matthew Story wrote: Across all TTYs, something like this would probably work: sudo fstat | awk '$5 ~ /^\/dev/ $8 ~ /tty/ { printf %s %s %s\n, $1, $8, $3; }' | sort -k1,2 from there, if you think you need to trace the process trees down, you can use