Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Nov 2000 19:29:59 -0800 (PST)
From:      Dan Busarow <dan@dpcsys.com>
To:        Tim McMillen <timcm@umich.edu>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Command not found.
Message-ID:  <Pine.BSF.3.96.1001109192554.25747B-100000@java.dpcsys.com>
In-Reply-To: <Pine.SOL.4.10.10011092208320.2751-100000@choplifter.gpcc.itd.umich.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 9 Nov 2000, Tim McMillen wrote:
> Hi,  if anybody could answer this i would appreciate it.  When I install
> something from the ports, I can verify that the executeable is in
> /usr/local/bin  and that /usr/local/bin is in my path.  But I still get
> Command not found error.   
> 	I happened to remember that rehash fixed that and it did, but the
> manpage for rehash wasn't helpful (it sent me to builtin).  I'm using csh.
> Why do i have to run rehash to allow the command to be found even though
> it is in the correct place?  Thanks,

csh builds a hash table of all the commands in your path.  When you
enter a command on the command line the shell looks it up in this
hash table.  Much faster than searching for the file in all the
dirs in your path (not that sh and friends seem all that slow locating
commands).

rehash rebuilds the hash table on demand when you add new commands.

Dan
-- 
 Dan Busarow                                                  949 443 4172
 Dana Point Communications, Inc.                            dan@dpcsys.com
 Dana Point, California  83 09 EF 59 E0 11 89 B4   8D 09 DB FD E1 DD 0C 82



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.1001109192554.25747B-100000>