You now know about a number of OS-9 commands that can help you set up and use your computer system. There are many more commands available. This chapter contains information about a few of the most helpful commands. Becoming acquainted with these makes it easy for you to use other commands and functions. OS-9 Commands contains more information and a complete reference to all OS-9 commands (including those you have already discussed).
7b look at your disk directories use the DIR command. For example, to view the contents of the current data directory, type:
If your data directory contains more filenames than can display on the screen at one time, the display pauses. Press the space bar to cause additional files to scroll onto the screen.
You can also view your execution directory in a similar manner. This time you must include the command option, x. Type:
current drive, specify a complete path for OS-9 to follow, including the disk drive name. For example:
You can also delete directories you create. When you delete a directory you also delete any files or subdirectories it contains; so use this command with caution. To delete a directory, follow these steps.
If you try to delete directories other than the ones you create, OS-9 might display Error #214, No Permission (you do not own the directory or have write permission for it): For information on handling such directories, see the ATTR command in OS-9 Commands.
There are times when you need to know the names of your current data and execution directories. The PWD and PXD commands make this possible. To determine your current data directory, type:
The command displays the path from the ROOT directory to the current data directory. For instance, if your current data directory is PLEASURE (see Figure 4.5 in Chapter 4) the display is:
A standard convention of OS-9 is to capitalize directory names. If you follow this convention when creating directories, you can always tell which files are directories at a glance.
COPY, like BACKUP, provides file security. If something happens to one file, you can use a copy. Also, you might want to copy a command or program to use in more than one directory, or you might want to use the same data on more than one computer.
Suppose you are in the PLEASURE directory of a diskette configured as in Figure 4.5. Your execution directory is the FAMILY directory, where you are using the Expenses program. Because the FAMILY directory does not contain any OS-9 commands, you have to change the execution directories whenever you want to use them.
You can make your work easier by copying the Expenses program to the CMDS directory. To do this, first make the CMDS directory your data directory by typing:
Now, Expenses is in the CMDS directory, and you do not need to change the execution directory to FAMILY to use it.
Likewise, if the ROOT directory is your data directory, and you want to copy the Mom file from the WORK directory to the ROOT directory, type:
You can copy any file between directories and between disks. To do so, you must provide the COPY command with a pathlist for the location of the original file and for the destination of its copy.
You can delete files in any directory using the DEL command, such as:
You can delete a file in the current execution directory by using the - x parameter. Fbr instance, to delete Myprogram from the current execution directory, type:
If the file you want to delete is in a directory other than the current data directory or the current execution directory, you must specify the full pathlist to the file. For instance, suppose you are in the ROOT directory of a diskette configured as Figure 4.5. To delete the Joe file in the WORK directory, type:
If the file you want to delete is on a drive other than your current drive, include the drive name in your pathlist, such as:
If you attempt to delete a file you did not create, OS-9 might display Error #214, No Nrmission. Fbr information on deleting such files see the ATTR command in OS-9 Commands.
OS-9 lets you change the names of files. Suppose Joe leaves home, and you now want to keep track of expenses for Sue. To change the name of the Joe file to Sue, type:
LIST is a command that lets you examine files that consist of text characters. For instance, to view the Dad file from the WORK directory, you might type: list family/work/dad ENTER
If you use LIST to display a file that is not a text file, it produces a meaningless display.
When using OS-9, you might notice that some commands begin execution immediately, while others require access to the disk drive before they execute. The OS-9 commands you need most often load into memory at startup, so they are available for immediate use. If you plan to frequently use a command that is not in memory, you can load it.
For instance the DSAVE command lets you copy an entire directory from one disk to another. To place the DSAVE module into your computer's memory, first be sure your execution directory is the CMDS directory, then type:
Now you can use DSAVE as many times as you want, without waiting for OS-9 to find it on disk.
At startup, OS-9 loads into memory the commands you use most often. If you are not sure whether a command already resides in memory, you can check using the MDIR command. To display a directory of the modules in your computer's memory, type:
A list of all the modules in your computer's memory appear on the screen. The names you see are of modules OS-9 uses to boot and handle system operations and the commands it loads into memory when you boot the system.
After you load a module into memory, you can also delete it. The process is called unlinking. To delete the DSAVE command from memory, type:
Do not attempt to unlink modules that you did not install in memory with the LOAD command.
OS-9 has nearly 50 commands and functions. This chapter has mentioned only a few. Not only are there other commands available through OS-9, several of the commands presented here have additional options.
The guidelines you learned in this handbook provide the background you need to make use of OS-9's many other capabilities.
By referring to OS-9 Commands you can learn how to create files, create procedure files to accomplish complicated tasks, send information to your printer, transfer data between devices, execute more than one task at the same time, and much more.