[apologies for replyin to reply. lost original mail]
Anshul Gupta wrote:
what I am looking for is present working directory for a particular user.
here's a small script which uses the /proc to query the CWD of all "$PROCESS"'es.
PROCESS=bash
for pid in `ps ax -o pid,cmd --no-headers | grep $PROCESS | sed -e "s/^ *//" | cut -f1 -d" "` do cd /proc/$pid/cwd PWD=`pwd -P` echo $PWD done