From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078715811927.tru64-unix-managers.marc@archive.invalid> From: Clayton Burton Date: Fri, 24 Jul 1998 20:22:23 +0000 To: tru64-unix-managers Subject: SUMMARY: viewing a shell's enviromental variables from OUTSIDE that X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078715811927 === The Answer: === I actually recieved a number of answers to this question! 1) ps - I had no idea that ps had this functionality! Thanks John Speno! >Yes. It's call 'ps'. See the man page for details, but the magic flag >is 'e', as in: >ps awwlxe 2) lsof - this utility which I hear about on the group will apparently give the CWD of a process, but I've never heard of it outside this group and it's not on my DU 3.2g alpha 4000 box. I'm guess that it's an optional install on the system CD's somewhere or a 3rd party piece of software. 3) proc_info - Tom Webster recommended a utility by Randy Hayman which I downloaded, but havn't checked out yet >Randy Hayman (haymanr@icefog.alaska.edu) wrote a utility called proc_info >that will display things like env vars and resource usage for processes. >Take a look in: > ftp://raven.alaska.edu/pub/randy/ 4) su - I got suggestions saying that I could use 'su - ' to become the user and see his enviromental variables..... I tried this, but it didn't seem to work. It really looked like this just spawned another shell with its own enviromental variables. Thanks to everyone! (also, sorry for double-sending this...it was bounced back to me apparently from another person's bad address before it was actually sent to me and I thought I'd mis-typed the address somehow!) === My original message:=== A database system which we use here at Furman has many different 'accounts'. To get into one of these accounts, the users cd into a certain directory and start the db client. Which directory they're in when they start up the client determines which account they go into. Is there any way I can see what the user's current directory is other than watching them log in? (Is there a way to view a shell's enviromental variables from outside that shell?)