Help on ps


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help on ps
# 1  
Old 08-15-2006
Help on ps

Hello,

Can some one help me to find the directory from which the specified process is running.

I need to find the directory of the process (run.csh).

For ex: If we have 5 directories

/usr/userA/run.csh
/usr/userB/run.csh

etc...

Any help is very much appreciated.
# 2  
Old 08-15-2006
Maybe you want something like this:

Code:
ps -ef | grep "run.csh"

# 3  
Old 08-15-2006
Hello,

No that run.csh was just an example. The processes are very long. I know you can use something like ucb's ps. ps wwax, which will give full process name. But I need to get the directory of the process.

Any help is very much appreciated.
# 4  
Old 08-15-2006
I really dont have any idea about what you mean by directory of a process, maybe someone else could help you better regarding this.

Regards,
Tayyab
# 5  
Old 08-16-2006
Hello,

Got the command. Just in case if anyone is interested

'pwdx pid', where pid is the process id of your process. This gives the directory of the executing process
# 6  
Old 08-16-2006
which UNIX flavour you are using ?
# 7  
Old 08-17-2006
that should be solaris ...

pwdx is one of the proc tools to display the working directory of the process
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question