The Unix Filesystem

The Unix filesystem is a tree of subdirectories, files, and links. While your CMS minidisk has only a single level containing all files, in Unix some files can be deeply below others in the hierarchy. The newer SFS (Shared File-System) on CMS is similar. In CMS you can give others access to your minidisks (in SFS to directories), but they then have access to all files there. Unix can do better! For each file separately, you can set individual access permissions, allowing reading, writing, or executing. Besides, you can make links (=shortcuts) to files, so while the file is accessible from many locations, there is no need for multiple copies of it.

Here's a look at a directory, displayed with the command ls -al, that is ls for "list files", followed by some options, which are recognizable by the dash preceding them. The option -l generates a long display, with all permissions and details. The option -a includes all system-files, whose name begins with a period (those are normally invisible).

The long directory listing is organized in columns: permissions, number of links, owner's netID, group name, size (in bytes), date/time of last change, and filename.

Wait, but where are the subdirectories I promised you? They are recognizable by the letter d at the beginning of the permissions. Right at the top, there is a funny directory, called ".", and another one, called "..", right below it. Those are the current directory ~volk and its parent directory /homes/home1 (or better, they are links to those directories).

The permission-triplets (rwx for read,write,execute) refer to user/group/others (ugo) in that order. So the directory CMSfiles could be read or opened (=executed) by everybody, but as my home-directory is accessible only to me, its subdirectories are inaccessible as well.

The relevant commands here are chmod and chown for changing accessibility mode and ownership. To make the directory CMSfiles accessible to the group wwwitl (the ITL webmasters), I would have to do two things:
First, change group-ownership of the directory CMSfiles and all its subdirectories to wwwitl via the command chown -R volk:wwwitl CMSfiles (the option -R means to apply this change recursively on all of the directory's contents).
Then, to allow them to enter my home-directory, I should type chmod go+x ~ (or I could use a period instead of the tilde, or even ~volk). That means literally "group&others add executability for my home-directory". Note that simply chmod g+x ~ would NOT have worked, as this directory belongs to the group math.

While these commands are not needed often, they are crucial if you want to publish a personal webpage on tigger/icarus. You will need to make a directory called public_html via the command mkdir public_html (that's make directory as in DOS), and make it readable and executable to everybody (as well as all its contents) via chmod a+rx public_html (the a is for all). Then you still need to allow people to enter your home-directory as described above.

To switch between directories, issue the command cd new_directory, e.g. cd public_html to enter your web-directory, if you have one. Typing cd ~ brings you back home, and simply cd does the same. To go one level up, use cd .. (recall that .. is a link to the parent directory). cd / will bring you to the root-directory, the top level of a Unix filesystem.

If you frequently need to access pages in remote directories, such as a departmental web-directory, you probably want to make a link to it in your home-directory. For example, to quickly go to the seminars directory, you would (in your home directory) type ln -s /usr/local/etc/httpd/htdocs/depts/accc/seminars seminars which would produce a symbolic link in your home directory pointing to the seminars-webpages. You can then simply type cd seminars to enter the remote directory.
Another important part of these shortcuts involves setting up the path for applications you want to run, so Unix can find them. That will be discussed in the section on customizing Unix.

That was already quite typical for some of Unix's greatest drawbacks. Commands are weird abbreviations that even the greatest gurus can't all remember, and everything has to be typed on the command line. There is no prefix-area to type commands in, as a Unix-session is generally not fullscreen-oriented (exception: the pilot command, which uses pine's file-browser and editor - check this out). Documentation on Unix generally seems to be written for geeks only, a major reason why many users hesitate making the switch. However, Unix is still (after thirty years) by far the most efficient and powerful operating system around, and getting it to work for you isn't nearly as hard as it seems at first glance. Let's look at some of the important commands.