previous up next print clean
Next: The ISO 9660 Standard Up: WHAT IS CD-ROM? Previous: File systems

How to overcome the read-only limitation

In our research we are not accustomed to read-only file systems. So we don't know how crippled they are compared to ordinary read-write file systems. Our worst fear was that the software that we put on a CD-ROM will be of no use until someone copies the whole thing into their hard disk. This would make CD-ROM as inconvenient as tape. So now I will explain a well known technique that makes everything easy:

In my back yard is a tree with about 3500 leaves on it and in my computer file system there are about 3500 files. In winter time all the leaves fall off the tree and then light passes directly through it because the leaves have much more surface area than the branches. Likewise the computer files take much more space than the directory structure. (Directories are sometimes called ``folders''). So the trick to using a CD-ROM as if it were a read-write file system is to first make a copy of the CD-ROMs directory structure on your hard disk. Like the tree branches, that isn't too voluminous. In this directory structure you do not put files, but pointers (symbolic links) to the files on the CD-ROM. Now whenever it happens that you need to change a file, what you do is replace the link to the CD-ROM by a copy of the file on your hard disk.

The tree without its leaves is often called a ``shadow tree''. To make one we could use a well-known simple shell program called lndir (distributed with X). Instead we use a program called cd_link that is free from Young Minds. It works much like lndir except that it also does the required name translation from ISO 9660 names to our directory names.

The only fly in the ointment is that it requires about 15-30 minutes to make the shadow tree. Luckily you pay this price only the first time you load the disk.


previous up next print clean
Next: The ISO 9660 Standard Up: WHAT IS CD-ROM? Previous: File systems
Stanford Exploration Project
12/18/1997