SUMMARY: viewing a shell's enviromental variables from OUTSIDE that shell

From: Clayton Burton <Clayton.Burton_at_furman.edu>
Date: Fri, 24 Jul 1998 16:22:23 -0400

=== 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_at_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 - <username>' 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?)
Received on Fri Jul 24 1998 - 20:18:33 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT