home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.admin:6737 comp.unix.questions:14855
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!gatech!prism!gs26
- From: gs26@prism.gatech.EDU (Glenn R. Stone)
- Newsgroups: comp.unix.admin,comp.unix.questions
- Subject: Re: showing working dirs of each users
- Message-ID: <78677@hydra.gatech.EDU>
- Date: 21 Dec 92 16:44:13 GMT
- References: <1992Dec21.082746.23803@latcs1.lat.oz.au>
- Reply-To: glenns@eas.gatech.edu
- Followup-To: comp.unix.admin
- Organization: The Group W Bench
- Lines: 20
-
- In <1992Dec21.082746.23803@latcs1.lat.oz.au> wongm@latcs1.lat.oz.au (M.C. Wong) writes:
- > I wonder if there is any utility that shows which working dir each
- > of the users are in, much like the finger and w command but also shows
- > where they are. Thank you !!
-
- Not that I know of; I do know that it would be a royal pain to do (probably
- involving C and setuid executables) on a SysV box... but if you luck out
- and have BSD or some variant thereof, you can probably cobble something
- together in a shell script, starting like
-
- ps agxeww | egrep -e [ -][t-][ck]sh | awk {some really funky stuff here}
-
- Where the above assumes nobody's running /bin/sh for a login shell,
- and {some really funky stuff} extracts the PWD= field from the output
- of ps....
-
- food for thought....
-
- Glenn R. Stone (glenns@eas.gatech.edu)
- Do not meddle in the affairs of wixards, it makes them soggy and hard to light.
-