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 505181
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: why not / instead of /usr
by phoenix on Mon 30th Jan 2012 21:30 UTC in reply to "why not / instead of /usr"
phoenix
Member since:
2005-07-11

That would make more sense, in that the Linux initrd/initramfs has taken over the "goal" of the / directory (enough filesystem and utilities to boot the OS) which kind of makes / redundant. It would make more sense to move everything from /usr to /, then the other direction.

I can just see in Fedora 18 or 19 where the directories directly off / will be empty, which just seems pointless.

If they're going to "optimise" and "streamline" things, then at least do it right.

Of course, that would break just about every piece of software out there that expects to install to /usr. ;) But since when has Fedora ever worried about not breaking things needlessly?

Reply Parent Score: 3

RE[2]: why not / instead of /usr
by kragil on Mon 30th Jan 2012 23:56 in reply to "RE: why not / instead of /usr"
kragil Member since:
2006-01-04

I don't think it makes a big difference wheter it is / or /usr, but I'll add my .02 cents anyway:

Long run / for real files (Fedora 18,19, maybe 20):

/boot
/etc
/home
/usr
/var

that looks pretty tidy _to_me_, but I'll admit it is not obvious what all the dirs do, but it can be explained in a few sentences if you are interested. People with no interest will never get any filesystem PERIOD
Cluttering that with runtime dirs and bin, games, include, lib, libexec, local, sbin, share, src and tmp really makes it a mess.
Everything else will be either not as flexible or will still need explaining.

Edited 2012-01-31 00:00 UTC

Reply Parent Score: 6

RE[2]: why not / instead of /usr
by jimmmy on Tue 31st Jan 2012 08:17 in reply to "RE: why not / instead of /usr"
jimmmy Member since:
2012-01-02

Of course, that would break just about every piece of software out there that expects to install to /usr.


Which would be mostly proprietary software which can't be rebuilt. The bulk of open source software that I've seen can be fixed by telling the build system where to put it. I don't see much of any reason why software shipped with a distribution would be affected much at all by this change.

Most closed source software that I've encountered doesn't care where you run it from so long as it can find some libraries. A shell script wrapper to set LD_LIBRARY_PATH or whatever and off you go. It's probably more likely that your binary only software will break due to an ABI change.

At lest that's been my experience (happy go lucky as it may seem).

I'm neither for or against it. IMO there's bigger things to fret about.

Reply Parent Score: 3

RE[2]: why not / instead of /usr
by Lennie on Tue 31st Jan 2012 12:09 in reply to "RE: why not / instead of /usr"
Lennie Member since:
2007-09-22

It would make more sense to move everything from /usr to /, then the other direction.


The idea is that you can snapshot /usr seperately from /var, /etc, /boot, etc.

Reply Parent Score: 2

phoenix Member since:
2005-07-11

"It would make more sense to move everything from /usr to /, then the other direction.


The idea is that you can snapshot /usr seperately from /var, /etc, /boot, etc.
"

If /boot, /var, /home, and /usr are separate filesystems, then it means that / is also a separate filesystem. Why would snapshotting one filesystem be easier than snapshotting another filesystem? And why wouldn't you want to snapshot the application configuration files along with the applications (meaning, /etc along with apps under /)?

Reply Parent Score: 2

RE[2]: why not / instead of /usr
by milki on Tue 31st Jan 2012 21:16 in reply to "RE: why not / instead of /usr"
milki Member since:
2012-01-31

That's what I thought too. Consolidation makes sense, but why further the / root and /usr split, if that was the historic problem to begin with?

And if I have a look at my root directory:

bin cdrom hardy initrd.img.old lib64 media proc sbin sys usr vmlinuz.old
boot dev home lib lost+found mnt root selinux tftpboot var www
build etc initrd.img lib32 maverick opt run srv tmp vmlinuz

And then at my /usr:

bin etc games include lib lib32 lib64 local sbin share src

It's clear which the appendix is. And if you were to move the /usr stuff onto main (nowadays have only one partition anyway), then there would hardly be additions.

But it also becomes appearant that "/games" is kind of redundant. There's little point in having a separate binary directory for one type of applications. That is just other historic cruft (namely to shame those users who have games installed). Likewise should /include actually be part of /src. And I'm not entirely sure about /share, but that should probably go into /var anyway.

Reply Parent Score: 1