Mailinglist Archive: opensuse (3202 mails)

< Previous Next >
Re: [opensuse] Process launching directory
  • From: Anders Johansson <ajh@xxxxxxxxxx>
  • Date: Wed, 14 Nov 2007 14:44:43 +0100
  • Message-id: <200711141444.43859.ajh@xxxxxxxxxx>
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.

Unless the program changes its directory itself, that will be the directory
from which it was launched


Madness takes its toll
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups