[SOLVED] No `rehash` command?

Everything related to Installing and maintaining software with pkg(pkgng).
Post Reply
zezollo
Posts: 11
Joined: Sun Feb 12, 2017 12:54 pm
Has thanked: 0
Been thanked: 1 time

[SOLVED] No `rehash` command?

Post by zezollo » Mon Jul 03, 2017 2:59 pm

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.

NevilleGoddard
Developer
Posts: 398
Joined: Thu Dec 22, 2016 10:30 pm
Location: Japan
Has thanked: 4 times
Been thanked: 1 time

Re: No `rehash` command?

Post by NevilleGoddard » Tue Jul 04, 2017 11:22 am

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: 11
Joined: Sun Feb 12, 2017 12:54 pm
Has thanked: 0
Been thanked: 1 time

Re: No `rehash` command?

Post by zezollo » Tue Jul 04, 2017 11:57 am

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: 1194
Joined: Mon Nov 19, 2012 7:54 pm
Has thanked: 7 times
Been thanked: 5 times

Re: [SOLVED] No `rehash` command?

Post by ericbsd » Fri Jul 07, 2017 12:19 pm

The Root user is setup by default with CSH.

Post Reply