*BSD News Article 50541


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!pravda.aa.msen.com!spool.mu.edu!howland.reston.ans.net!tank.news.pipex.net!pipex!uknet!eldorado.net-tel.co.uk!usenet
From: Andrew Gordon <andrew.gordon@net-tel.co.uk>
Subject: Re: path question
X-Nntp-Posting-Host: evening-star.net-tel.co.uk
Content-Type: text/plain; charset=us-ascii
Message-ID: <DE6q0M.A2A@net-tel.co.uk>
To: michael@gnj.or.jp
Sender: usenet@net-tel.co.uk (usenet poster)
Content-Transfer-Encoding: 7bit
Organization: NET-TEL Computer Systems Ltd
References: <423snf$ist@gol1.gol.com>
Mime-Version: 1.0
Date: Thu, 31 Aug 1995 17:02:44 GMT
X-Mailer: Mozilla 1.1N (Macintosh; I; PPC)
X-Url: news:423snf$ist@gol1.gol.com
Lines: 19

MICHAEL <michael@gnj.or.jp> wrote:
>If I enter "test1" then the system reports that the command is not
>found. However, if I enter "./test1" the command executed ok.

You can add '.' to your path if you really want to do this - it is 
generally considered insecure, in case you browse into a directory where 
someone has left a program called 'ls' which does somthing other than 
what you expect 'ls' to do (like mailing the owner all of your secret 
data...)

>I checked the path by looking at "set" and the path includes
>"/home/michael/bin", so I made a directory called bin and moved
>test1 into bin. But when I enter "test1" it still is not found.

If using csh, you need to use the 'rehash' command after adding programs 
to the directories on the path - otherwise, the shell 'knows' that there 
is no such program (because there wasn't one there last time it looked).