From owner-freebsd-user-groups Fri Aug 13 4:45:17 1999 Delivered-To: freebsd-user-groups@freebsd.org Received: from pslgate0.psl.com.sg (pslgate0.psl.com.sg [202.14.153.4]) by hub.freebsd.org (Postfix) with ESMTP id 966E814D42; Fri, 13 Aug 1999 04:45:01 -0700 (PDT) (envelope-from klng@psl.com.sg) Received: from psl.com.sg (mirage [202.14.154.50]) by pslgate0.psl.com.sg (8.7.5/8.7.3) with ESMTP id TAA19389; Fri, 13 Aug 1999 19:43:00 +0800 (SGT) Received: from psl.com.sg (robin [202.14.154.175]) by psl.com.sg (8.8.6/8.8.6) with ESMTP id TAA12283; Fri, 13 Aug 1999 19:40:31 +0800 (SST) Message-ID: <37B404C4.332848AE@psl.com.sg> Date: Fri, 13 Aug 1999 19:43:01 +0800 From: Ng Kok Leong Organization: Panasonic Singapore Laboratories Pte Ltd X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-newbies@FreeBSD.ORG, freebsd-user-groups@FreeBSD.ORG Cc: klng@psl.com.sg Subject: path Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-user-groups@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I am new to FreeBSD and currently I am working with FreeBSD3.2. May I know where can I set the directory path so that I do not have to go to the directory where the file resides in order to access it? I have tried to set the PATH variable in the .profile file but this does not seems to work. Currently, when I want to run a executable program, eg. check, in the directory that I am in, I have to key in ./check Can I solve the problem of keying ./ by setting the PATH=./ ? How can check the path setting? Hope to hear from you soon. Thank you in advance. Regards To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-user-groups" in the body of the message From owner-freebsd-user-groups Sat Aug 14 18:30:21 1999 Delivered-To: freebsd-user-groups@freebsd.org Received: from exegrnnts001.seattleu.edu (exegrnnts001.seattleu.edu [206.81.198.91]) by hub.freebsd.org (Postfix) with ESMTP id E43251526E; Sat, 14 Aug 1999 18:30:18 -0700 (PDT) (envelope-from hodeleri@seattleu.edu) Received: from seattleu.edu (ppp27.pm3b.wport.com [206.129.99.174]) by exegrnnts001.seattleu.edu with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id QS0G8N34; Sat, 14 Aug 1999 18:30:08 -0700 Message-ID: <37B6180E.E9F5335F@seattleu.edu> Date: Sat, 14 Aug 1999 18:29:50 -0700 From: Eric Hodel Organization: Dis X-Mailer: Mozilla 4.51 [en] (X11; I; FreeBSD 3.2-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Ng Kok Leong Cc: freebsd-newbies@FreeBSD.ORG, freebsd-user-groups@FreeBSD.ORG Subject: Re: path References: <37B404C4.332848AE@psl.com.sg> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-user-groups@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Ng Kok Leong wrote: > > Hi, > > I am new to FreeBSD and currently I am working with FreeBSD3.2. > May I know where can I set the directory path so that I do not have > to go to the directory where the file resides in order to access it? > I have tried to set the PATH variable in the .profile file but this does If you are using sh, you can set your path in the .profile, but this will only run on a login shell. If you have root using the sh shell, it won't pick up the sbin directories if you su. Use the .shrc and add ENV=$HOME/.shrc;export ENV in order to have sh set a new path when you su, and don't forget to make .shrc executable. You can add path changes vi command line editing, aliases, etc to the .shrc file, and they will be run whenever the shell is started (I think this is the prefered way.) Also don't add . to your path, it opens a security hole (and it is not too difficult to get used to using ./) -- Eric Hodel hodeleri@seattleu.edu "They cook your gonies" -Terry Lambert's uncle on why he doesn't have a microwave To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-user-groups" in the body of the message