Linked by Thom Holwerda on Mon 30th Jan 2012 20:39 UTC
General Unix Finally something really interesting to talk about. If you've used UNIX or any of its derivatives, you've probably wondered why there's /bin, /sbin, /usr/bin, /usr/sbin in the file system. You may even have a rationalisation for the existence of each and every one of these directories. The thing is, though - all these rationalisations were thought up after these directories were created. As it turns out, the real reasoning is pretty damn straightforward.
Thread beginning with comment 505200
To read all comments associated with this story, please click here.
Between K&R and today..
by Slowcoder on Mon 30th Jan 2012 22:19 UTC
Member since:

While it's hard to argue with why the inventors of UNIX did it a certain way, the proliferation of it is actually simple, and quite sane as well.

It goes back to the day when people used NFS extensively for workstations. Here's what they were all used for:

/bin - Local disk, dynamically linked binaries (against libraries in /lib)
/sbin - Local disk, statically linked binaries
/usr - NFS share
/usr/bin - Shared binaries (apps..) dynamically linked against libs in /usr/lib
/usr/sbin - Statically linked binaries

Basically, /bin and /sbin contained what was needed for system maintenance, and enough programs to mount the NFS share.
Before you mounted the NFS share, /usr simply was not there.

It annoys me to no end that many Linux distros today put dynamically linked binaries in /sbin...

But, I digress.. The usefulness of this layout got outdated the moment cheap large-capacity harddisks entered the market.

Reply Score: 6

RE: Between K&R and today..
by brynet on Mon 30th Jan 2012 22:55 in reply to "Between K&R and today.."
brynet Member since:

It is annoying, supposedly Linux distributions no longer include static binaries for /bin and /sbin.

They were typically required on Unix systems for single-user mode.

Someone told me that static glibc has been broken for many years now.

No wonder Linux folks don't understand the reasoning behind /{,s}bin and /usr/{,s}bin.

Reply Parent Score: 3

RE[2]: Between K&R and today..
by Lennie on Tue 31st Jan 2012 12:14 in reply to "RE: Between K&R and today.."
Lennie Member since:

Statically linked just isn't as useful anymore, with chroot and initrd on Linux you don't really need it.

That is why it kinda got into disarray.

Reply Parent Score: 2