From owner-freebsd-questions Sun Jan 24 21:18:17 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA18464 for freebsd-questions-outgoing; Sun, 24 Jan 1999 21:18:17 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA18455 for ; Sun, 24 Jan 1999 21:18:14 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.1/8.9.1) id XAA14017; Sun, 24 Jan 1999 23:16:36 -0600 (CST) Date: Sun, 24 Jan 1999 23:16:35 -0600 From: Dan Nelson To: Eugeny Kuzakov Cc: questions@FreeBSD.ORG Subject: Re: pid&work dir Message-ID: <19990124231635.A13953@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: ; from "Eugeny Kuzakov" on Mon Jan 25 10:52:24 GMT 1999 X-OS: FreeBSD 3.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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