*BSD News Article 93996


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news.maxwell.syr.edu!ais.net!uunet!in1.uu.net!151.164.1.5!news1.rcsntx.swbell.net!usenet
From: slfarmer@swbell.net (Steven L. Farmer)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Help with a.out
Date: 20 Apr 1997 11:20:18 -0500
Organization: Steve's
Lines: 28
Sender: steve@pro200.farmer.org
Message-ID: <86g1wlk6nx.fsf@pro200.farmer.org>
References: <3355973C.429F@charlotte.infi.net> <5jdd6t$ndu@lace.colorado.edu>
NNTP-Posting-Host: ppp-208-15-144-14.tulsok.swbell.net
X-Newsreader: Gnus v5.4.37/XEmacs 19.15
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39402


fcrary@rintintin.Colorado.EDU (Frank Crary) writes:

> In article <3355973C.429F@charlotte.infi.net>,
[snip...]
> I hit the same problem. Unix looks for executables in the directories
> defined by the $PATH environment variable, and for some reason the
> current directory is not part of the default $PATH in FreeBSD (or
> at least not as of 2.1.5). You can fix that by editing your .cshrc file.
> Originally, mine had a line reading
> 
> set path = (~/bin /bin /usr/{bin,games} /usr/local/bin /usr/X11R6/bin /sbin /u
> sr/sbin )
> 
> by changing that to
> 
> set path = (. ~/bin /bin /usr/{bin,games} /usr/local/bin /usr/X11R6/bin /sbin /u
> sr/sbin )

  This is generally regarded to be a Bad Thing, since it opens the
(barn?)  door to Trojan Horses.  It's really best to simply get into
the habit of typing "./prog" to execute something in your current
directory.  If you *must* add dot to your path, adding it to the start
is the worst possible choice.  Add it to the end instead, or at least
following all of the normal "system" directories.

Cheers,

Steve