## Some Common Command Formats

This section is a summary of some commands commonly used by new or casual OS-9 users, and some common formats. Each command is followed by an example. Refer to the individual command descriptions later int his book for more detailed information and additional examples. Parameters or options shown in brackets are optional. Whenever a command references a directory file name, the file must be a directory file.

    CHD filename                               chd DATA.DIR

Changes the current data working directory to the directory file specified.

    COPY filename1 filename2                   copy oldfile newfile

Creates filename2 as a new file, then copies all data from “filename1” to it. “filename1” is not affected.

    DEL filename                               del oldstuff

Deletes (destroys) the file specified.

    DIR [filename] [e] [x]                     dir myfiles e

List names of files contained in a directory. If the “x” option is used the files in the current execution directory are listed, othervise, if no directory name is given, the current data directory will be listed. The “e” option selects the long format which shows detailed information about each file.

    FREE devicename                            free /d1

Shows how much free space remains on the disk whose name is given.

    LIST filename                              list script

Displays the (text) contents of the file on the terminal.

    MAKDIR filename                            makdir NEWFILES

Creates a new directory file using the name given. Often followed by a chd command to make it the new working data directory.

    RENAME filename1 filename2                 rename zip zap

Changes the name of filename1 to filename2.