[SOLVED] No `rehash` command?

Everything related to Installing and maintaining software.
Post Reply
zezollo
Posts: 12
Joined: Sun Feb 12, 2017 12:54 pm

[SOLVED] No `rehash` command?

Post 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!
Last edited by zezollo on Tue Jul 04, 2017 11:57 am, edited 1 time in total.
User avatar
NevilleGoddard
Developer
Posts: 517
Joined: Thu Dec 22, 2016 10:30 pm
Location: Japan

Re: No `rehash` command?

Post 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
zezollo
Posts: 12
Joined: Sun Feb 12, 2017 12:54 pm

Re: No `rehash` command?

Post 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).
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: [SOLVED] No `rehash` command?

Post by ericbsd »

The Root user is setup by default with CSH.
Post Reply