Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!spool.mu.edu!caen!uakari.primate.wisc.edu!ames!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!math.fu-berlin.de!dct.zrz.tu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!uknet!axion!borax!dtynan From: dtynan@borax.kbss.bt.co.uk (Dermot Tynan) Newsgroups: comp.unix.bsd Subject: Re: binaries are unavailable when moved to /usr/bin until re-logon Message-ID: <1243@borax.kbss.bt.co.uk> Date: 25 Sep 92 10:33:16 GMT References: <1992Sep21.175158.25399@Saigon.COM> Organization: British Telecom Lines: 20 David.Fox@Saigon.COM writes: > After doing a few rounds of getting source-code to something, compiling it, > building the binary of it, and then moving it into its proper place (usr/ > bin, or /usr/local/bin) I've noticed that when I attempt to run the command > once it has been moved - even though it certainly is in the path - that > the system responds with "Command not found." However, when I relogon, the > file now is accessible. Judging from the message, I'd say you were using /bin/csh (the Bourne shell, /bin/sh would simply say "not found"). Anyway, the C shell uses command hashing. In short, it searches for all executables in the path, and builds a hash table for finding the command. If you change your path, this table is rebuilt automatically, as it is on login. Anyway, the short answer to your question is, run the 'rehash' command at the prompt, to rebuild the hash table. Hope this helps... - Der -- Dermot Tynan dtynan@kbss.bt.co.uk Claddagh Films Limited Watch out where the huskies go, and don't you eat that yellow snow.