![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can we get the list of users who accessed a file | Chanakya.m | Shell Programming and Scripting | 2 | 09-18-2007 02:58 AM |
| How to obtain list of users ? | bobby36 | UNIX for Dummies Questions & Answers | 7 | 04-09-2007 09:34 PM |
| list users current path | Gandalf77 | UNIX for Advanced & Expert Users | 1 | 09-29-2006 05:14 AM |
| Trying to get list of logged on users sorted | kungfuice | Shell Programming and Scripting | 7 | 07-26-2006 11:35 AM |
| Find users using system(List them only once) | xBuRnTx | UNIX for Dummies Questions & Answers | 3 | 10-03-2005 03:37 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
List current paths of users
Looking for a command which shows the current path of other users.
Similiar to the PWD command. Need to be able to see which part of the system the user is logged on to. Thanks G |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Quote:
|
|
#3
|
|||
|
|||
|
ps -ef shows the latest command, not always the path.
enter the command and look at your own session and you will just see ps- -ef, not the path. eg. redback 1396838 1085518 0 Sep 22 - 0:00 /at1/uv/redback/server/redb vryandrl 1400832 1441954 4 05:55:01 pts/1 0:00 ps -ef First one shows the path, the second is my session, no path. |
|
#4
|
|||
|
|||
|
I don't think there is a command that will show you this information directly. If that is the case, you might have to get there indirectly using "lsof" or some other means.
lsof (short for list-open-files) lists open files on the system. You can use the "-u" option to specify to list files open by the specified user. Try "lsof -u fred|grep -iw cwd" to list files currently open by user fred which are of the type "current working directory" (cwd). That pretty much tells you what you want to know. Check out the man page for lsof, it has a lot of other options as well. The fuser command might also be useful. This lists processes (and login names) that are using a specific file or directory. If you want to know who is using files in /app or is who is "in" /app, "fuser -c -u /app" would tell you that. |
|
#5
|
|||
|
|||
|
Thanks Rowan,
This helps a lot, I really need to know if he is in one directory or not, so fuser will get me what I need. re andy |
|||
| Google The UNIX and Linux Forums |