From owner-freebsd-questions@FreeBSD.ORG Tue Sep 14 02:54:28 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50EEB16A516 for ; Tue, 14 Sep 2004 02:54:28 +0000 (GMT) Received: from smtp102.rog.mail.re2.yahoo.com (smtp102.rog.mail.re2.yahoo.com [206.190.36.80]) by mx1.FreeBSD.org (Postfix) with SMTP id A80BA43D4C for ; Tue, 14 Sep 2004 02:54:27 +0000 (GMT) (envelope-from Mike.Jeays@rogers.com) Received: from unknown (HELO ?192.168.2.100?) (mjeays2551@24.43.95.82 with plain) by smtp102.rog.mail.re2.yahoo.com with SMTP; 14 Sep 2004 02:54:26 -0000 From: Mike Jeays To: robg In-Reply-To: <5c389d3b04091319371aef7e73@mail.gmail.com> References: <5c389d3b04091319371aef7e73@mail.gmail.com> Content-Type: text/plain Organization: Message-Id: <1095130466.757.49.camel@chaucer> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 13 Sep 2004 22:54:26 -0400 Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: showing which path a user program runs from? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2004 02:54:28 -0000 On Mon, 2004-09-13 at 22:37, robg wrote: > hi, say im the user 'rob' and i have the same program in two seperate > folders in my /home dir and run both.. if i run ps it shows me im > running both, but how can i find out which location folder is running > which program shown in ps The "which" command will tell you the fully-qualified path name of any executable that can be found in the $PATH variable. It will search in order of the directories in the path. So, if your program is "myprog", run the command "which myprog".