Showing posts with label til. Show all posts
Showing posts with label til. Show all posts

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.

today I learned

Ubuntu: To switch windows from one desktop to the other (accidental discovery):
- SHIFT+CTRL+ALT+Arrow Right or Left

Linux, from 6.033 hands on 1:
Jotting down notes as I go along ... feel free to point out mistakes
- stat [file_or_dir]
- The difference between symbolic link and hard link (Phil introduced this concept to me 2 years ago, but now I finally get it). I've always used symbolic link and it's the way to go!
- echo $PATH "tells the shell where to look in the file system for programs we type on the command line"
- you can do "setenv OLDPATH $PATH" in "tcsh -f", not in bash shell
- echo $0 or ps -p $$ finds what shell I'm in.