On Wed, 2007-11-14 at 14:44 +0100, Anders Johansson wrote:
> On Wednesday 14 November 2007 11:20:08 Cristea Bogdan wrote:
> > Is there a way to find from which directory a process was launched?
> 
> It depends on what you mean, really. If you mean "what was the current 
> working 
> directory when the process was launched", then the answer is no, you can't
> 
> You can find the current working directory of the process, by doing
> 
> ls -l /proc/<pid>/cwd
> 
> where <pid> is the process id of the process.

Wouldn't 'ls -l /proc/<pid>/exe give the result he wants?  CWD usually
just points to the process owner's home directory.

-- 
---Bryen---

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to