Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jan 2002 14:24:47 +1100
From:      Edwin Groothuis <edwin@mavetju.org>
To:        Joe & Fhe Barbish <barbish@a1poweruser.com>
Cc:        FBSD Questions <questions@FreeBSD.ORG>
Subject:   Re: Where does command rehash live
Message-ID:  <20020109142447.K823@k7.mavetju.org>
In-Reply-To: <LPBBIGIAAKKEOEJOLEGOOEMPCLAA.barbish@a1poweruser.com>; from barbish@a1poweruser.com on Tue, Jan 08, 2002 at 10:19:07PM -0500
References:  <LPBBIGIAAKKEOEJOLEGOOEMPCLAA.barbish@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 08, 2002 at 10:19:07PM -0500, Joe & Fhe Barbish wrote:
> When I issue the rehash from within a script it get 
> not found. 
> If I give it's full path I think it will work. 

> Problem is I don't know how to find the directory where rehash lives. 

It's a shell builtin command:

[~] edwin@k7>sh
[\w] \u@k7>rehash
rehash: not found
[\w] \u@k7>hash
builtin hash
builtin alias

[~] edwin@k7>bash
[~] edwin@k7>hash
hits    command
   1    /bin/sh
[~] edwin@k7>rehash
bash: rehash: command not found

[~] edwin@k7>csh
%rehash
%hash
hash: Command not found.
%

[~] edwin@k7>tcsh
> rehash
> hash
hash: Command not found.


So for c shell you have to use rehash, for bourne shell you have to use hash.

Edwin

-- 
Edwin Groothuis   |              Personal website: http://www.MavEtJu.org
edwin@mavetju.org |           Interested in MUDs? Visit Fatal Dimensions:
------------------+                       http://www.FatalDimensions.org/

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?20020109142447.K823>