Mailinglist Archive: opensuse (3202 mails)

< Previous Next >
Re: [opensuse] Process launching directory
  • From: Bryen <suseROCKS@xxxxxxxxx>
  • Date: Wed, 14 Nov 2007 08:02:01 -0600
  • Message-id: <1195048921.4357.29.camel@xxxxxxxxxxxxxxxxxx>

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
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.


To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups