[SOLVED] No `rehash` command?

Everything related to Installing and maintaining software with pkg(pkgng).

[SOLVED] No `rehash` command?

Postby zezollo » Mon Jul 03, 2017 1:59 pm


(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?

Last edited by zezollo on Tue Jul 04, 2017 10:57 am, edited 1 time in total.
Posts: 8
Joined: Sun Feb 12, 2017 12:54 pm
Has thanked: 1 time
Been thanked: 0 time

[SOLVED] No `rehash` command?

Re: No `rehash` command?

Postby NevilleGoddard » Tue Jul 04, 2017 10: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.

csh, tcsh, zsh: rehash

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

So hash may work under GhostBSD
Posts: 375
Joined: Thu Dec 22, 2016 10:30 pm
Has thanked: 77 times
Been thanked: 49 times

Re: No `rehash` command?

Postby zezollo » Tue Jul 04, 2017 10:57 am

Thanks, but it looks like hash and rehash have completely different purposes :?


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

Re: [SOLVED] No `rehash` command?

Postby ericbsd » Fri Jul 07, 2017 11:19 am

The Root user is setup by default with CSH.
User avatar
Posts: 1142
Joined: Mon Nov 19, 2012 7:54 pm
Has thanked: 41 times
Been thanked: 64 times

Return to Installation and Maintenance of software with pkg(pkgng)

Who is online

Users browsing this forum: No registered users and 2 guests