Page 1 of 1

[SOLVED] No `rehash` command?

Posted: Mon Jul 03, 2017 2:59 pm
by zezollo
Hello,

(Not sure this is the right place to post this)

After a fresh install (10.3 in a Virtual Box), I noticed there is no rehash, under sh or bash, doesn't seem to exist.

Code: Select all

# rehash
rehash: not found
#
Is this normal? How to get it?

Thanks!

Re: No `rehash` command?

Posted: Tue Jul 04, 2017 11:22 am
by NevilleGoddard
Hi, zezollo.

I found this at a forum:



i may be wrong but i think this is more of a shell thing than an OS thing.

this
csh, tcsh, zsh: rehash

is the same command as this
bash, ksh, zsh, sh: hash

So hash may work under GhostBSD

Re: No `rehash` command?

Posted: Tue Jul 04, 2017 11:57 am
by zezollo
Thanks, but it looks like hash and rehash have completely different purposes :?

https://unix.stackexchange.com/a/86017/173102

https://www.freebsd.org/cgi/man.cgi?que ... ormat=html (find "rehash").

But you are right, rehash simply does not exist in sh neither in bash. (I thought it did exist in sh since I use it on my FreeBSD server were I am pretty sure I use sh and not csh, but obviously I am wrong).

Re: [SOLVED] No `rehash` command?

Posted: Fri Jul 07, 2017 12:19 pm
by ericbsd
The Root user is setup by default with CSH.