An Introduction to the CCRMA Linux Filesystem

Matt Wright, Sept 2004

Basic Concepts

A "filesystem" is the hierarchical organization of all the files accessible from a computer. In Unix these files might be stored on multiple different physical disks, or even stored on disks connected to different computers and accessible via the network.

Every Linux machine at CCRMA (i.e., the workstations you will use to do your CCRMA class work) presents you with the same filesystem, so you can work on any machine and all the files you use will be in the same place.

Files and directories each have names. Directories are just containers for files and for other directories ("subdirectories"), and are also called "folders". There is one "top-level" directory (aka the "root" or "root directory" of the filesystem); every other directory is a subdirectory of the top-level directory or a subdirectory of a subdirectory of the top-level directory, etc.

In Unix, the "full path" a file specifies how to reach that file starting at the top-level directory. For example, the full path /var/spool/mail says to start at the top-level directory, then go into the subdirectory named "var", then to go into the subdirectory of /var named "spool", then to go into the subdirectory of /var/spool named "mail."

See the links in the "Further Reading" section at the bottom of this document for better explanations of some of these ideas.

CCRMA Directories You Should Know About

Your Home Directory (e.g., /user/m/matt or /user/n/nando)

This is the main directory you will use. When you log into any CCRMA machine, you will be "in" this directory by default. Generally all your course work, etc., should be saved in this directory.

Files in this directory (and all of its subdirectories, etc.) are backed up regularly by CCRMA's system administrators.

The tilde character can be used as an abbreviation for your or anyone's home directory. (Read more)

/zap

Each computer at CCRMA has a directory named /zap that is stored on a local disk. Everything in this directory is deleted when you log out! Your files will be "zapped" when you stop working, hence the name.

This is a good directory for temporary scratch files, both because your mess will be cleaned up (i.e., obliterated) when you're done, and because file access will be faster to a local disk than over the network. That's why CLM writes output sound files to the /zap directory.

The "snd" disk

Many gigabytes of data need to be copied and saved whenever the system administrators back up CCRMA users' important files. There just isn't enough storage capacity to back up large media files such as 10-minute sound files.

Therefore CCRMA has a 588 gigabyte disk named /usr/ccrma/snd that can be used to store sound files, movies, etc. This disk is not backed up! That's the whole point; use this disk to store your files that are too large to back up regularly. You can burn CDs of these huge files to make your own personal backups.

Your Personal Web Site at CCRMA (~/Library/Web)

To make a web site at CCRMA, make a subdirectory of your home directory called Library and a subdirectory of that called Web. The file index.html in that directory will be your CCRMA home page; for example, the URL http://ccrma.stanford.edu/~matt points to the file /user/m/matt/Library/Web/index.html on the CCRMA filesystem.

All the other files in that directory and all of its subdirectories will be accessible via your website at CCRMA. For example, the URL http://ccrma.stanford.edu/~jos/Piano/Acoustics_Piano.html refers to the file /user/j/jos/Library/Web/Piano/Acoustics_Piano.html on the CCRMA filesystem.

If a URL corresponds to a directory, then CCRMA's web server will look for a file named index.html in that directory; for example, the URL http://ccrma.stanford.edu/~matt/latencytest corresponds to the file /user/m/matt/Library/Web/latencytest/index.html on the CCRMA filesystem.

If you want the web server to generate an HTML directory listing of files in a directory, make a file called .htaccess in that directory containing the text "Options Indexes". For example, I did this for the directory /user/m/matt/Library/Web/max_plaster_pix instead of making a file called index.html in that directory, so the URL http://ccrma.stanford.edu/~matt/max_plaster_pix/ gives you a large selection of pictures of Grace Leslie abusing the father of computer music without my having had to enter the names of all those images into an HTML file.

CCRMA's Website: /usr/ccrma/web/html

All the non-user-specific parts of CCRMA's web site live under /usr/ccrma/web/html - for example, the URL http://ccrma.stanford.edu/planetccrma/software corresponds to the file /usr/ccrma/web/html/planetccrma/software/index.html on the CCRMA filesystem.

Further Reading

Short explanation of Unix filesystem important concepts and terminology with some nice pictures.

More complete introduction to File Systems in Unix, including more syntax for refering to files, types of files, permisisons, some important commands, and wild cards.

List of basic Unix commands. (Note: this page tells you to use the passwd program to change your password, but at CCRMA you need to use yppasswd instead.)