From owner-freebsd-questions Wed Jun 19 22:25:11 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.crackula.com (adsl-64-169-68-38.dsl.snfc21.pacbell.net [64.169.68.38]) by hub.freebsd.org (Postfix) with ESMTP id 255C037B40A for ; Wed, 19 Jun 2002 22:24:58 -0700 (PDT) Received: (from monkey@localhost) by mail.crackula.com (8.9.3/8.9.3) id WAA23070; Wed, 19 Jun 2002 22:20:40 -0700 (PDT) Date: Wed, 19 Jun 2002 22:20:40 -0700 From: Adam Weinberger To: Grant Cooper Cc: questions@FreeBSD.ORG Subject: Re: rehash command Message-ID: <20020619222040.A23708@crackula.com> References: <006601c2181e$74b1f3a0$7b6c6bd1@ab.hsia.telus.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: MarioMail Super Nintendo w/ 2 controllers In-Reply-To: <006601c2181e$74b1f3a0$7b6c6bd1@ab.hsia.telus.net>; from grant.cooper@nucleus.com on Wed, Jun 19, 2002 at 11:50:59PM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG grant - the rehash command goes through all the directories in the PATH variable and looks for every program that it can find. if you install a new program, nmap for example, you can't just type in "nmap" and have the program start. this is because the shell doesn't know where the command "nmap" lives. once you issue a "rehash" command, then the shell will know where the program lives, and can thus execute it. so, you use rehash to tell the shell "look around for new programs." this process takes about a second. "which tcsh" tells you the full path to tcsh, namely /bin/tcsh on a freebsd system. the instructions that you have quoted are saying: "to make sure that tcsh is installed correctly, type in 'rehash' to make sure that the shell didn't miss where the program lives, and then 'which tcsh' to tell you exactly where that living space IS." in other words: to call your local pizza place, first get the latest phone book, and then look up the number for Dominos. -Adam Grant Cooper took 0.5K on Wed, Jun 19, 2002 at 11:50:59PM -0600 to say: > > I did the "man rehash" to understand the term, but can someone help me out > in english? I am a little confused still. > How does rehash determine if your shell was installed. I did this command > before and after and got the same results. > > "Install the shell as a port or a package, just as you would any other port > or package. Use rehash and which tcsh (assuming you are installing tcsh) to > make sure it got installed." > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- "I am disrespectful to dirt! Can you see I am serious!" -Mr. Sparkle Adam Weinberger monkey@crackula.com http://www.crackula.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message