Date: Sun, 17 Dec 2000 22:21:46 -0800 From: Doug Barton <DougB@gorean.org> To: Tim McMillen <timcm@umich.edu> Cc: Dru <genisis@istar.ca>, Otter <otterr@telocity.com>, Drew Tomlinson <drewt@writeme.com>, "FreeBSD Questions (E-mail)" <freebsd-questions@FreeBSD.ORG> Subject: Re: Command to Re-Read Paths? Message-ID: <3A3DACFA.E231DE42@gorean.org> References: <Pine.SOL.4.10.10012172112130.3899-100000@frogger.gpcc.itd.umich.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A3DACFA.E231DE42>