Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jan 1999 23:16:35 -0600
From:      Dan Nelson <dnelson@emsphone.com>
To:        Eugeny Kuzakov <kev@lab321.ru>
Cc:        questions@FreeBSD.ORG
Subject:   Re: pid&work dir
Message-ID:  <19990124231635.A13953@dan.emsphone.com>
In-Reply-To: <Pine.BSF.4.02.9901251050240.9569-100000@lab321.ru>; from "Eugeny Kuzakov" on Mon Jan 25 10:52:24 GMT 1999
References:  <Pine.BSF.4.02.9901251050240.9569-100000@lab321.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jan 25), Eugeny Kuzakov said:
> 
> hi!
> 
> One question.
> I know PID of process. How can I know work dir, where it run ?
> Linux has key for ps. In Solaris I can view it in /proc..
> thaks for advices.

fstat -p pid

or (after installing /usr/ports/sysutils/lsof)

lsof -p pid

I recommend using lsof, since it's portable across most Unixes and that
means you only have to learn one command.

	-Dan Nelson
	dnelson@emsphone.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990124231635.A13953>