Sunday, February 13, 2011

today I learned

"A general-purpose processor is an implementation of an interpreter" - Principles of Computer System Design for 6.033

names
/bin - programs
/etc - configuration files
/dev - input/output devices
/usr - user directories Common mistake! See Walt's comment below
/usr - Unix System Resources
/home - users


Walt's Comment:

The /usr directory is actually not users. That's /home, or sometimes (and this is rare) /users. /usr actually stands for Unix System Resources.

Here's the way it works:

bin and sbin are regular programs and programs intended for superuser (root), respectively. The ones in /bin and /sbin are just enough to get the system up during a boot process, for example system recovery.

/usr/bin and /usr/sbin are where the unix distributions's files go.
/usr/local/bin and /usr/local/sbin are where the custom applications are placed.

In theory, one needs to back up /usr/local and /home, and that gives you all the [basic] stuff you need to preserve your system's content or port it to another machine. Grab /etc for system configuration settings.

Also, in theory, one should be able to drop a Unix update on the system, and it will update /bin, /sbin, /usr/bin, and /usr/sbin leaving your user's data and your customizations in tact.


Bottom line, usr is Unix System Resources (the resources Unix needs to do it's thing). It's coincidence that it sounds like usr.


You can convince yourself this is true by looking in /usr and you'll see file and subdirectories that have nothing to do with users.

p.s. And mixing the two would be a very bad idea, both for backups and for security.

No comments:

Post a Comment