Before you can use OS-9 extensively, you need to know how the system organizes and stores data on disk. The information in this section is true for both floppy diskettes and hard disks. However, because of the greater storage capacity of a hard disk, it is of particular importance to hard disk users.
Consider the information stored on disks to be of two basic types, programs and data. A program is code that causes your computer to execute a task. Data is information that a program uses or that a program creates.
All the information that OS-9 stores on disks, whether program or data, is stored in units called files. Whenever a program creates a file, OS-9 defines a portion of your disk to store it. It keeps the location of the file in a special list (called a directory), also located on the disk, so that it knows where to find your program or data the next time you want it.
A directory is a storage space for filenames, other directory names, or both.
After you format a disk, it contains ~ one directory called the ROOT directory. However, a disk can have many directories. For instance, besides the ROOT directory, your System Master diskette contains the CMDS and SYS directories. The ROOT and CMDS directories are especially important to you.
When you boot OS-9, you automatically begin operation from these two directories. The ROOT directory becomes your current data directory and the CMDS directory becomes your current execution directory.
Whenever you ask OS-9 to store a file on a diskette, it automatically stores it in the current data directory (the ROOT directory), unless you tell it otherwise. If you ask OS-9 to execute a command or program, it automatically looks for that command or program in the execution directory (the CMDS directory), unless you tell it otherwise.
OS9Boot
Startup
OS9Boot
Startup
OS9Boot
Startup
mom
dad
joe
There is nothing wrong with storing all your files in the ROOT directory. Doing so makes it easy to access them because they are always in your data directory.
However, creating multiple directories makes it easy to keep your data organized when you have many files, or if more than one person is using the same disk. Such a multiple-directory organization is especially helpful when using hard disks, which can store hundreds of individual files.
Also, when you have multiple directories, you can store files having the same name in different directories without conflict, such as in the PLEASURE and the WORK directories of Figure 4.5.
The file and directory names shown so far consist only of letters of the alphabet, but you can use other characters and symbols in a file or directory name as long as each name begins with a letter. The following is a complete list of acceptable characters:
You can include as many as 29 characters in a file or directory name.
Because you can organize OS-9 disks into multiple levels, you need a way to tell the system where to find directories and files. The directions you give are called pathlists.
A pathlist is exactly what its name implies-a path (or route) to the device, directory, or file you want to access. For instance, if you are in the ROOT directory (see Figure 4.5) and want to look at the contents of a file in the WORK directory, you must tell OS-9 how to get there. The pathlist from the ROOT directory to the Dad file is f a m i 1 y / w o r k / d a d . OS-9 expects you to separate the junctions of pathlists with slashes. To look at the contents of Dad, you type:
Because you are accessing a file on the current disk, you do not need to specify a drive name. Because every disk contains a ROOT directory, and all other directories and files branch from it, ROOT is always implied in a pathlist. If Figure 4.5 represented the diskette in Drive /D 1, the pathname to the Dad file would be /dl/family/work/dad.
Depending on the location of the directory or file you want to access, a full pathlist need not contain any more than the name of a drive, the name of a directory, or the name of a file. For instance, the complete pathlist from the ROOT directory of Figure 4.5 to the Startup file is 5 t a r t u p . To look at the contents of Startup, type:
To save time, or if you do not know a full pathlist, you can refer to the current directory, or to a higher-level directory, using an anonymous name, or name substitute, as follows:
You can use an anonymous directory name in place of a pathlist or as the first name in a pathlist. Some examples are:
Anonymous names can refer to either execution or data directories, depending on the context in which you use them.
In the same manner that OS-9 has names for its commands, it also has names for its devices. These names are abbreviations of actual device names. Fbr instance, instead of typing Disk Drive 0 to refer to your first disk drive, you only need to type / DO. To refer to your printer, type / P . OS-9 windows are named /W through /W 7 .
All of OS-9's device names are preceded by a slash this is how OS-9 can tell you are referring to a device rather than a directory or file. When you purchase your System ester diskette, OS9 is configured to recognize two disk drives, a printer, and one terminal port. Fbr information on how to configure your system to recognize other devices, see Chapter 7.