[Front] [Prev Chapter]
[Next Chapter]
If you are already an experienced user, or you have used this operating system before, you do not need to read this chapter. Refer to the rest of this manual for more information about the operating system.
The memory used to run programs is referred to as Random Access Memory, or RAM for short.
There are several different types of disk you can use: hard disks, diskettes (floppy disks), and memory (or virtual) disks. The following sections give brief descriptions of these types of disk.
There is another type of disk called a removable disk. Examples of these are Syquest* and Bernoulli* drives.
Always handle diskettes with care.
The write-protect notch on 3.5-inch diskettes is built into the diskette. To write-protect the diskette, slide the plastic tab up so that a hole appears through the write-protect notch.
Write-protect a 5.25-inch diskette by placing a tab (usually supplied with the diskette) over the notch in the top right-hand side of the diskette. The diskette is write-protected until the tab is removed. Some 5.25-inch diskettes do not have a notch; these diskettes are permanently write-protected.
A memory disk only stores data temporarily. When you switch off your
computer, or reboot, any data stored in a memory disk is lost. You must
use a hard disk or diskettes to store data permanently.
Preparing Disks for Use
Before you can use a hard disk, it must be formatted and partitioned.
Formatting the disk enables it to store data. Partitioning
the disk divides it into one or more partitions so that the operating
system can store and retrieve data more easily. Also, the operating system
must be installed on a primary partition.
Commands
You use a command to make your computer carry out a particular
task such as copying a file. Commands can act on specified files, groups
of files, or entire disks. Command names are usually followed by options
which modify the way the computer carries out the command. Internal Commands
Internal commands are the commands that are loaded into memory when you
start up the operating system, because they are used most frequently. They
are loaded from a file called COMMAND.COM, so it is easy for the operating
system to execute them. You can run internal commands whenever the system
prompt is displayed. External Commands
External commands are only loaded into memory when you run them, to save
space in memory. External command files have the filename extensions .COM
and .EXE. When you enter an external command at the system prompt, the
operating system retrieves the appropriate command file from disk and
executes it. The operating system must have access to the directory which
contains the external command file. Batch File Commands
A file in which you store a sequence of commands you use frequently is
called a batch file. You can use a batch file to start an
application, for example. When you enter the name of the batch file at
the system prompt, the commands in the batch file are executed one after
the other, as if you are entering them separately.
Configuration Commands
Configuration commands are used in the configuration file
(CONFIG.SYS or, if you have Windows 95 also installed on your
computer, DCONFIG.SYS). The operating
system reads the CONFIG.SYS file every time you start your computer, and
executes all the commands it finds. Many commands are added to
the CONFIG.SYS/DCONFIG.SYS file when you install the operating system or run the SETUP
program, but you can also edit the configuration file yourself. Refer to
Chapter 9, ``Configuring the System'' for
more information about the configuration commands.
Entering Commands
You enter commands at the system prompt. Whenever you see the
prompt, you know that the computer is waiting for you to enter an
instruction from the keyboard. The information you enter at the prompt
is referred to as the command line.[DRDOS] C:\>
This indicates that C: is the current drive. When you enter a command,
the operating system always looks to the current drive. If you have
installed the operating system onto diskettes, then A:\> is shown
as the current drive in the system prompt. DIR C:\LETTERS /2
Command options such as C:\LETTERS are known as parameters. The
parameter C:\LETTERS tells the DIR command which directory's files to
list. Command options with a forward slash (/) are referred to as
switches. You use a switch to select a particular version of
the command. The switch /2, for example, tells DIR to display the directory
listing in two columns.DEL C:\LETTERS\MAYLET.TXT /CS
Sometimes, other symbols are required, such as commas and colons. The MODE
command, for example, looks as follows:MODE COM1:9600,N,8,1
The ``Command Reference'' chapter of DOSBook includes the complete syntax
for every operating system command as well as an explanation of the syntax. Editing the Command Line
If you make a mistake when typing a command, you see the following
message when you enter the command:Command or filename not recognized
You may have simply mistyped the instruction or directed the command
to the wrong drive (see ``Changing Drives''
below). If you make a mistake and you have not yet pressed
<Enter>, you can correct the command line by pressing
the <Backspace> key which erases the command line one
character at a time. You can then type the command line again.
The operating system also has a powerful feature that stores commands entered previously and lets you recall them by pressing the up and down arrow keys. You can then edit and issue them again. You may have enabled this feature when you installed the operating system by setting the HISTORY option to ON. If you did not enable HISTORY, you can enable it at any time by running the SETUP program; see Chapter 9, ``Configuring the System'' for detailed information about using SETUP and the HISTORY option.
The ``Command Reference'' chapter of DOSBook contains a complete list of
the keys you can use for command line editing. See the sections ``Command
Line Editing'' and ``Extended Command Line Editing'' in the ``Command
Reference'' chapter of DOSBook, the online manual.
Changing Drives
When you enter a command, the operating system always looks for that
command on the current disk drive. If you want a command to operate on
another drive, you change drives by entering the new drive letter followed
by a colon. For example:A:
This changes the current drive to drive A: and the default prompt changes
to:[DRDOS] A:\>
Any command you enter now operates on the A: drive.DIR A:
Getting Online Help for Commands
You can display help text about any command and its options by entering
the command followed by /? or /H.DOSBOOK command <Enter>
Displaying a Screenful of Data at a Time
Some commands display information that fills more than one screen; text
moves off the screen (scrolls) so that you miss the first part
of the information. This will happen if you enter a DIR command and the
listing is very long, for example. You can suspend scrolling in any of
the following ways:
Every file has a name to identify it and (optionally) an extension. A filename extension is separated from the filename by a period (.) and often identifies the class of the file: LETTER.TXT, for example.
Directories are a means of keeping track of your files by organizing them into groups according to contents, project names, user names, classes, and so on. Directories contain information about the files they have stored in them, including file size, time of creation, and when they were last changed. Directories can be arranged in a hierarchical structure so that they can contain other directories (subdirectories) as well as files. A directory can also have an extension to its name, but extensions to directory names are not used frequently.
The following special characters are not valid:
< > = , ; : . * ? [ ] / \ + |
Also note that the operating system uses special names to identify peripheral devices added to your computer called ``reserved device names.'' You should not name your files with any of these. There are also some common filename extensions that are used for particular types of files; refer to Table 4-1.
|
Reserved Device Name
|
Reserved Filename Extension
|
|---|---|
|
CON
|
.$$$
|
|
AUX or COMn
|
.BAK
|
|
PRN or LPT1
|
.BAS
|
|
LPT2
|
.COM
|
|
LPT3
|
.CPI
|
|
NUL
|
.EXE
|
|
CLOCK$
|
.SYS
|
CHAPTER?.DOC matches with CHAPTER1.DOC and CHAPTER2.DOC
Therefore, you can use a single command to copy both of these files, by
using the ? wildcard in the command line.
The * Wildcard
The asterisk (*) is ``shorthand'' for several question marks. The
asterisk is valid from the position in which it appears to the end of
the filename. The following example shows this:
and with CHAPMEM.FAX and CHAPFAX.BAK
WARNING: Be careful when you use wildcards. The wildcard *.*, the global
wildcard, includes all files. Typing DEL *.* would delete all
files in a directory. If you use the global wildcard, the operating
system prompts you before executing the command. If you want prompting
before you delete any files, use DELQ and ERAQ.
Filelists
A filelist is a text file that contains a list of filenames. When you use
a filelist at the system prompt, the filelist name is preceded by the @ (at) symbol. This tells the command that the file immediately following the @ is a filelist, and to execute on each file named in the filelist.FRED.BAT
BERT.BAT
*.DAT
Then, when you perform an operation on @MYFILE.LST such as copying it,
FRED.BAT, BERT.BAT, and all files in the current directory with
extension .DAT are copied. Directory Concepts
The following is a list of concepts that you need to understand to make
the most of the operating system's directory structure:
You can move around the directory structure from the root downwards, and up to the root again. You can also go directly to a subdirectory without going through intervening directories. Use the CHDIR (or CD) command to move around the directory structure; refer to the ``Command Reference'' chapter of DOSBook for a description of CHDIR (CD).
. means the name of the current directory.
These entries are automatically created by the operating system when you
make a directory. When you issue a DIR command, the entries . and .. appear
at the top of the listing. You cannot delete the . and .. entries in a
directory.
Paths
In a tree directory structure, more than one file or directory can have the
same name. For example, both the directories SALES and ACCOUNTS can contain
a file called FRANCE.DOC. The operating system distinguishes between the
two files called FRANCE.DOC by using a path. The path shows the operating
system the route through the directory structure to the files. Working with Directories
There are five commands that are used specifically with directories. They
are listed in Table 4-3.
DIR > MYLIST.DOC <Enter>
You can also redirect the output from a command to a device, using the device name. The following command, for example, sends the current directory listing to the first parallel printer:
DIR > PRN <Enter>
The following command, for example, sorts the contents of the file TELNUMS.DOC into alphabetical order:
SORT < TELNUMS.DOC <Enter>
DIR | MORE <Enter>MORE displays the listing one screenful at a time.
MORE is a special type of command, known as a filter command. Filter commands read input, act upon it and then output the result, often to the screen. The common filter commands are MORE, SORT, and FIND.
You can pipe commands through filter commands and combine them with redirection.
Refer to Chapter 16, ``Redirecting Information'' for more information on redirection.