home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!bnr.co.uk!uknet!doc.ic.ac.uk!cc.ic.ac.uk!imperial.ac.uk!vulture
- From: vulture@imperial.ac.uk (Thomas Sippel - Dau)
- Newsgroups: comp.unix.admin
- Subject: Re: showing working dirs of each users
- Message-ID: <1992Dec22.152249.14405@cc.ic.ac.uk>
- Date: 22 Dec 92 15:22:49 GMT
- References: <1992Dec21.082746.23803@latcs1.lat.oz.au> <78677@hydra.gatech.EDU>
- Sender: vulture@carrion.cc.ic.ac.uk (Thomas Sippel - Dau)
- Reply-To: cmaae47@imperial.ac.uk
- Organization: Imperial College of Science, Technology and Medicine
- Lines: 34
- Nntp-Posting-Host: cscgc
-
- In article <78677@hydra.gatech.EDU>, gs26@prism.gatech.EDU (Glenn R. Stone) writes:
- - 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 !!
- ....
- - 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....
-
- The real challenge is defining what the "user" is. If you want to find out
- because you want to check whether you can unmount a file system, you have to
- consider processes (shells at the very least), which do nothing but wait
- for their children.
-
- If your users have X-terminals (or workstations ...) you also have to decide
- which of the active processes for a user are relevant.
-
- If you want to find out where your users are doing what they are actually
- doing, you have to work out what is actually being done. If I watch the system
- performance monitor for a few minutes between reading news items (which I
- sometimes do ...) you would have to detect my eye movements before you could
- work out my "working" directory.
-
- Thomas
-
- --
- *** This is the operative statement, all previous statements are inoperative.
- * email: cmaae47 @ ic.ac.uk (Thomas Sippel - Dau) (uk.ac.ic on Janet)
- * voice: +44 71 589 5111 x4937 or 4934 (day), or +44 71 823 9497 (fax)
- * snail: Imperial College of Science, Technology and Medicine
- * The Center for Computing Services, Kensington SW7 2BX, Great Britain
-