rehash?? (openbsd user question)

Started by markbnj, February 22, 2004, 06:29:14 AM

Previous topic - Next topic

markbnj

OK>  Yes, OpenBSD boy (here with another "STUPID??) question..

WTF is rehash??

if I man rehash on OBSD OR on FreeBSD, it shows as an internal csh command

...ok, rehash apparently just forces a "relook" at current directory

SO WHY is it needed?
..
Note: I also do: Openbsd/nocat.net, as well as Solaris, Mandrake, <no newmandrake  machines anymore> and even (yuch: windoze)

davidcl

rehash makes csh/tcsh re-scan your PATH directories for binaries.

Let's say I just built a program called foobar from source and copied the binary to /usr/local/bin.  Generally I won't be able to type 'foobar' at the command line until after I either log out and log back in, or do a rehash.

Of course it's not strictly necessary because you could always type "/usr/local/bin/foobar"

Hope this helps.  As far as I know all of this should apply equall to FreeBSD and OpenBSD, and any other form of Unix for that matter, but only under csh-based shells.  I'm not sure how you do the equivalent under sh-based shells.

markbnj

Don't shoot... Promise no more bad punns.

See, being a ksh kind of guy, I never came across rehash before. nice concept though... beats re-dotting your dot. profile, like I usually do.

And so far, biggest problem in openbsd-install land is the SQL packages.
Note: I also do: Openbsd/nocat.net, as well as Solaris, Mandrake, <no newmandrake  machines anymore> and even (yuch: windoze)