From owner-freebsd-questions Sun Dec 17 22:25:34 2000 From owner-freebsd-questions@FreeBSD.ORG Sun Dec 17 22:25:32 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from dt051n37.san.rr.com (dt051n37.san.rr.com [204.210.32.55]) by hub.freebsd.org (Postfix) with ESMTP id 5FE4737B400 for ; Sun, 17 Dec 2000 22:25:32 -0800 (PST) Received: from gorean.org (Studded@master [10.0.0.2]) by dt051n37.san.rr.com (8.9.3/8.9.3) with ESMTP id WAA27135; Sun, 17 Dec 2000 22:21:47 -0800 (PST) (envelope-from DougB@gorean.org) Sender: doug@dt051n37.san.rr.com Message-ID: <3A3DACFA.E231DE42@gorean.org> Date: Sun, 17 Dec 2000 22:21:46 -0800 From: Doug Barton Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Tim McMillen Cc: Dru , Otter , Drew Tomlinson , "FreeBSD Questions (E-mail)" Subject: Re: Command to Re-Read Paths? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Tim McMillen wrote: > And csh (and tcsh) are the only ones that keep the hash table of > commands. The others just search through the path. As I was informed the > last time I asked about rehash, csh maintains this hash table to make > command execution slightly more efficient by speeding the finding of the > executeable. Other shells don't do this. Actually, just about every modern shell keeps a hash table of commands its already seen. All of the "advanced" bourne shell derivatives (like bash, my shell for example) that I am aware of do. $ type mount mount is hashed (/sbin/mount) The difference is that the bourne shell derivatives are smart enough to scan the PATH again automatically when the user requests a command it hasn't already seen. :) Doug -- "The most difficult thing in the world is to know how to do a thing and to watch someone else do it wrong without comment." -- Theodore H. White Do YOU Yahoo!? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message