Re: Understanding /root, /usr, /var and so on
- To: debian-user@lists.debian.org
- Subject: Re: Understanding /root, /usr, /var and so on
- From: Andrew Cady <d@jerkface.net>
- Date: Mon, 10 Apr 2006 20:46:03 -0400
- Message-id: <[🔎] 20060411004603.GA22278@jerkface.net>
- Mail-followup-to: debian-user@lists.debian.org
- In-reply-to: <20060330154215.GD2935@topoi.pooq.com>
- References: <5Uph3-4Ev-3@gated-at.bofh.it> <200603260046.39024.gene.heskett@verizon.net> <20060326071610.GB9640@odin.dempsky.org> <200603260239.51986.gene.heskett@verizon.net> <20060326082206.GA20510@jerkface.net> <20060326193251.GA11599@debian.potter> <20060330150306.GA28871@jerkface.net> <20060330154215.GD2935@topoi.pooq.com>
On Thu, Mar 30, 2006 at 10:42:15AM -0500, hendrik@topoi.pooq.com wrote:
> On Thu, Mar 30, 2006 at 10:03:06AM -0500, Andrew Cady wrote:
> >
> > Apparently the BSD folks decided in retrospect that mixing binaries with
> > configuration was a bad idea. But why not put them in /bin? It may
> > well have been performance reasons; that also seems to have been the
> > original reason for placing binaries in /usr/bin. At least, AT&T unix
> > shipped everything in /bin, but recommended the administrator place most
> > of those commands in /usr/bin for faster performance on lookups in /bin.
>
> So. presumably the advent of filesystems that can handle large directories
> efficiently (like reiser) have made some of these distinctions unnecessary?
I would say so. Less for faster filesystems than for faster hardware: a
"large" directory today is one containing many thousands of files, not
dozens. My /usr/bin has 2021 files, and I doubt it's appreciably slower
than /bin, even with hashed b-trees disabled. Probably the directory
stays cached in memory most of the time; searching it in memory would be
over 100k times as fast as the original unix, according to Moore's law.
(PII450 from 1995, original Unix in 1969; 26 years is a 2^17 increase.
Of course, the original Unix had low limits on filename length; probably
its directories used a much faster representation in general).
> Or maybe the user in intended to do
> ls /bin
> whenever he forgets the name of a common command without being distracted by
> commands he can't or probably won't want to execute?
The better way to achieve that effect would be to link the commonly used
commands into a directory elsewhere -- especially since common use will
vary from machine to machine and user to user. /bin is only for commands
required before mounting /usr or for recovery, so, e.g., readlink and
loadkeys are included, but mplayer and mutt (two of my favorites) are
not.
Reply to: