Linked by Thom Holwerda on Sat 23rd Aug 2008 15:37 UTC
Permalink for comment 327777
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
News
Linked by Thom Holwerda on 06/18/13 22:33 UTC
Linked by Anonymous on 06/18/13 22:26 UTC
Linked by Thom Holwerda on 06/18/13 22:25 UTC
Linked by Thom Holwerda on 06/18/13 17:45 UTC
Linked by Thom Holwerda on 06/18/13 17:32 UTC, submitted by poundsmack
Linked by Thom Holwerda on 06/17/13 17:58 UTC
Linked by Thom Holwerda on 06/17/13 17:52 UTC
Linked by Thom Holwerda on 06/14/13 21:03 UTC
Linked by Thom Holwerda on 06/14/13 20:46 UTC
Linked by Thom Holwerda on 06/14/13 17:32 UTC
More News »
Sponsored Links



Member since:
2006-10-08
You're bringing up valid questions.
This is really something (along with the lib/ problem) that I find a bit strange in Linux. In BSD, there's a differnce between "the OS" and "installed packages", while Linux does not have this kind of separation. BSD puts system's stuff in /etc/, and local (not to the system belonging) parts in the respective /usr/local/etc/ directories. You can conclude the nature of a file from its name and it place within the file hierarchy.
This one continues the aspect mentioned before. Some Linux distributions have /opt/, others don't. In some cases, the purpose of lib/ and share/ subtrees is merged, too.
In general, additional software should go into /usr/local/ where the basic subtrees of the system (etc/, lib/, include/, bin/, share/) are replicated with the respective purpose. Games should obey this rule. But as I mentioned before, it's hard to say which things do not belong to the system because Linux distributions do not differ between OS and installed packages; in fact, the "OS part" is a set of packages chosen by the creator of the distribution. Rule: Everythin within /usr/local/ is extra stuff, everything outside is the system (mountpoints and home directories not mentioned here).
And /opt/... I think it has initally been intended as a directory that contains extra stuff that does not obay the subtree rule, i. e. no etc/, lib/ or bin/ separation, instead a name of the application with its own subtree.
Following the rule:
/usr/local/bin/foo
/usr/local/lib/libfoo.so.2
/usr/local/share/doc/foo/readme.txt
Not following the rule
/opt/foo/foo
/opt/foo/libfoo.so.2
/opt/foo/readme.txt
/mnt is intended as a temporary mount point for the system administrator (according to man hier).
/media is intended for (usually auto)mounted media, it contains a subtree for the devices (e. g. /media/cdrom, /media/dvd, /media/stick) or mountpoints are created from a label provided by the media itself or by the class of the drive (man geom).
Allthough the access to /floppy and /cdrom is much easier than their successors within /media (due to less typing), these mountpoints may already be deprecated.
No, because programs or users that use /tmp should keep an eye on the stuff they do on their own. This is because /tmp may disappear at system shutdown, or, may be empty after system startup, for example when /tmp leads to a RAM disk or some system setting clears /tmp at startup. It's the system's waste dump. :-)
I mentioned this before, it's complicated in Linux because it's hard to determine what's local and what's not. In BSD, it's obvious.
Only the last one should exist, an assumption from priority and precedence considerations.
Usually databases and logs that are created and managed by programs, not by the user.
If it's okay to lose it - /tmp. If it should be kept - /var.
In ~/public_html? :-)
You see this from my explainations, and some reasons why it is so. Alltough much of the stuff is well intended, there are inconvenient uses of the existing structures, maybe due to sloppyness, or due to general problems of interpretation. There are many differences between the many Linux distributions and among the UNIXes, too.