COHERENT manpages
This page displays the COHERENT manpage for MS-DOS [That other operating system].
List of available manpages
Index
MS-DOS -- Technical Information
That other operating system
MS-DOS is the native operating system of the IBM-AT and compatible
computers. As such, it needs no introduction to most users. Many
customers have asked, however, how MS-DOS and COHERENT compare in terms of
their capabilities; and many have also asked for a chart that maps familiar
MS-DOS commands to their COHERENT equivalents. This article attempts to
fulfill these requests.
MS-DOS vs. COHERENT
MS-DOS differs significantly from COHERENT in practically every aspect of
its design. For example, its file system is incompatible with COHERENT;
its shell command.com differs significantly from COHERENT's suite of
shells; the manner in which it loads and executes a program differs
completely from COHERENT's.
The most noticeable difference in design, however, is that MS-DOS is a
single-user, single-process operating system, whereas COHERENT is a multi-
user, multi-tasking operating system.
Single-user means that only one user can use MS-DOS at any given time:
whoever sits at the keyboard ``owns'' the machine and all its facilities.
Multi-user means, of course, that more than one user can use COHERENT at
any given time, via terminals or modems plugged into the computer's serial
ports. The number of users who can use your COHERENT system at once is
limited only by your computer's speed, available memory, and by the number
of serial ports that can be plugged into your computer.
Single-tasking means that MS-DOS can do only one task at a time: it loads a
program into memory, runs it to completion, then awaits your request to
execute another program. Multi-tasking means that COHERENT can execute
more than one program at a time.
To grasp how multi-tasking can simplify some work, consider the task of
formatting floppy disks. Under MS-DOS, you pop the floppy disk into the
drive, invoke the MS-DOS program format, answer its queries, then go get a
cup of coffee while the machine grinds away. Formatting a box of high-
density floppy disks ties up your machine for the better part of an hour,
which is largely wasted time for you. Under COHERENT, however, you can
format a floppy disk in the background -- that is, you can tell COHERENT to
execute the disk-format program unsupervised, and let you work with another
program. For example, if you wish to low-level format a 5.25-inch, high-
density floppy disk in drive 0 (that is, drive A), use the following
command:
/etc/fdformat -v /dev/fha0 &
Try it. You'll notice that the COHERENT prompt returns immediately: while
COHERENT is formatting your disk for you, you can edit a file, play a video
game, dial out to a remote system, or even format a second disk in your
machine's B drive (should you have one).
Multi-tasking also means that you can program COHERENT to execute programs
untended, even while you are away from your machine. The UUCP system is a
good example of this feature. UUCP lets you exchange mail and files with
remote systems via modem; once the system is set up, it runs automatically,
without requiring that you sit at the keyboard to run it.
This discussion only gives you a taste of the advantages COHERENT enjoys
over an obsolete system like MS-DOS. The following documents contain
information that MS-DOS users will find helpful:
-> The tutorial Using the COHERENT System introduces COHERENT to new users.
If you are new to COHERENT and have not yet read this tutorial, you
should do so before you continue any farther.
-> The Lexicon articles floppy disks and hard disk discuss the in's and
out's of using mass-storage device with COHERENT. The article floppy
disks in particular discusses in detail all the steps required to format
and manipulate MS-DOS-style floppy disks under COHERENT.
-> The Lexicon articles modem, printer, and terminal discussion how to
connect these devices to COHERENT, and introduce the set of commands
with which you can manipulate them under COHERENT.
-> The Lexicon article execution describes in detail how COHERENT loads and
executes a program. This article is aimed at the technically
knowledgeable, but neophytes may find parts of it helpful.
-> The Lexicon article commands summarizes all commands available under the
COHERENT system. This article will help you grasp the scope of
COHERENT's suite of commands, and will help you explore them
systematically.
-> The following Lexicon articles describe COHERENT commands for
manipulating MS-DOS files and disks:
doscp Copy files to/from an MS-DOS file system.
doscat Concatenate a file on an MS-DOS file system.
doscp Copy a file to/from an MS-DOS file system.
doscpdir
Copy directories to/from an MS-DOS file system.
dosdel Delete files from an MS-DOS file system.
dosdir Show the contents of an MS-DOS directory.
dosformat
Write an MS-DOS file system onto a floppy disk.
doslabel
Label an MS-DOS floppy disk. The MS-DOS file system can reside
on a floppy disk or an MS-DOS portion of a hard disk.
dosls List contents of an MS-DOS file system.
dosmkdir
Create a directory on an MS-DOS file system.
dosrm Remove a file on an MS-DOS file system.
dosrmdir
Remove a directory from an MS-DOS file system.
COHERENT Equivalents to MS-DOS Commands
The following table lists the most commonly used MS-DOS commands, and gives
COHERENT equivalents.
Note that often there is no single COHERENT command that equates to a given
MS-DOS command. COHERENT often offers several alternatives, and you can
select the one that best suits your needs. Every COHERENT command has its
own article in the COHERENT Lexicon; look there first for details on how to
use the command.
BACKUP
This command copies a directory's files to a formatted floppy disk to
back them up. To do so under COHERENT, use the command:
find . -print | cpio -ocm > /dev/rfha0
Note that cpio requires a formatted, defect free floppy disk, however
you do not need to create a filesystem on the floppy disk prior to
using cpio.
Note that if you want COHERENT to prompt you before it backs up a
file, use the command:
find . -print | cpio -ocmr > /dev/rfha0
See the article on the archiving command cpio for details on this
command -- especially important if you expect to retrieve your backed-
up files.
Note, too, that the device /dev/rfha0 corresponds to a 5.25-inch,
high-density floppy disk in drive 0 (drive A). See the article floppy
disks for a list of the devices that correspond to different sizes and
configuration of floppy disks.
BREAK
Abort a command. Aborting a command under COHERENT varies, depending
upon whether the command is running in the foreground or the
background. The keystroke
<ctrl-c>
aborts most commands that are running in the foreground. To abort a
command that is running in the background, you must use the kill
command. See its Lexicon entry for details on how to use it.
CHDIR or CD
Change to another directory. To do so under COHERENT, use the command
cd dir
where dir is the directory to which you wish to go. The directories
`.' and `..' are used by both COHERENT and MS-DOS; since MS-DOS
``borrowed'' its directory structure from UNIX (of which COHERENT is
an implementation), the similarity should not be surprising.
Note that MS-DOS requires that before you can change to directory on
another physical device or partition, you must first switch to that
device by typing its name before you use the chdir command. COHERENT
has no such restriction.
CHKDSK
Check the integrity of a file system. Under COHERENT, use the
command:
/etc/fsck [option] [filesystem]
Read the Lexicon entry on fsck before you attempt to run it!
COMP Compare the contents of two files. To do so under COHERENT, use the
following command to compare two binary files:
cmp [option] file1 file2
cmp displays the bytes which differ between the files.
To compare the contents of two text files, use the command:
diff [option] file1 file2
COPY Copy the contents of one file into another; create the target file if
it does not already exist. Under COHERENT, say:
cp oldfilename newfilename
To copy a set of files into a directory without changing their names,
use the following form of the command:
cp file1 ... fileN directory
DATE Reset the current date and time. Under COHERENT, use the command:
date yymmddhhmm.ss
Only the superuser can reset the system's date and time. When date is
used without an argument, it prints the date and time on the standard
output.
DIR Type the contents of a directory. Under COHERENT, use the command:
ls -l
DIR/W
List a directory's contents in columnar form. Under COHERENT, use
either the command:
lc
or the command:
ls -C
DISKCOPY
Copy one floppy disk track-by-track to another floppy disk. COHERENT
has no exact equivalent to this command; however, you can copy the
contents of one disk to another by using the following set of
commands.
First, place a write-protect tab on your source disk; insert the disk
into drive 0 (drive A), then type the following command:
dd if=/dev/fha0 of=/tmp/filename
This copies the contents of the 5.25-inch, high-density floppy disk in
drive 0 into file /tmp/filename. For a table of devices that
correspond to other sizes and configurations of floppy disks, see the
Lexicon article floppy disks.
Second, insert formatted destination diskette into drive 0, and then
type the command:
dd if=/tmp/filename of=/dev/fha0
This command copies the files in directory /tmp/filename onto the
target floppy disk. Note that the target disk must be formatted
before it can receive files; see the Lexicon article floppy disks for
information on how to do this.
EDLIN
Perform simple-minded editing of text files. Under COHERENT, the ed
editor performs line editing, but is much more sophisticated than
edlin. COHERENT also includes the vi and MicroEMACS screen editors,
which are more useful still.
ERASE or DEL
Remove a file or a directory. To erase a file, use the command:
rm file1 [... fileN ]
To erase a directory, use the command:
rmdir directory
To erase a directory and all files and directories below it, use the
command:
rm -r directory
FIND Find a pattern within a text file. Under COHERENT, use the command:
egrep [option] pattern [file ...]
egrep is an extremely useful command; see its Lexicon entry for
details on how to use it.
FORMAT
Format a floppy disk. To format a floppy disk for MS-DOS, use the
command dosformat. To format a floppy disk for COHERENT, use the
command fdformat. For details, see the respective Lexicon entries for
these commands. Under COHERENT, use the command
MEM Find how much space is left free on your hard disk. Under COHERENT,
say:
df [options]
See the Lexicon entry on df for details.
MKDIR
Create a new directory. Under COHERENT:
mkdir directory ...
MODE Set parameters for terminals and ports. Under COHERENT, use the
command stty. This command comes with many options; see its Lexicon
entry for details. The default speeds of all ports and terminals
reside in file /etc/ttys. The superuser can use a text editor to edit
this file to change any or all default settings.
MORE Display text a screenful at a time. Under COHERENT, use the commands
more or scat.
PRINT
Print files via a serial port. To print a file on a dot-matrix
printer, use the command:
lpr file1 [ ... fileN ]
To print a file on a Hewlett-Packard LaserJet printer, use the command
hpr file1 [ ... fileN ]
Note that before these commands can be used, the appropriate devices
must be linked to your system. See the Lexicon article on printer for
details.
Note, too, that COHERENT uses a spooling system to manage the printing
of files; thus, attempting to print a non-existent file will not hang
the system.
PROMPT
Change the command.com prompt. The COHERENT shells store the prompt
format within the environmental variable PS1. This variable is
usually defined in each user's .profile file; this file holds commands
that are executed whenever the user logs in. To change the definition
of your prompt, edit .profile to define PS1 to suit your preference,
then log in again.
Note that the information that can be embedded within the prompt
varies between the Bourne and Korn shells. See the Lexicon articles
sh and ksh for details on those shells and their prompts.
RENAME
Rename a file. Under COHERENT, use the command:
mv oldfile newfile
mv can also be used to move files from one directory or file system to
another.
RESTORE
Restore a file saved with the BACKUP command. Under COHERENT, insert
the floppy disk upon which the cpio utility saved its backup archive;
then type the command:
cpio -icv < /dev/rfha0
Note that this command assumes you are using /dev/rfha0, which
describes a 5.25-inch, high-density floppy disk in drive 0 (drive A).
For a table of devices that correspond to other sizes and
configurations of floppy disks, see the Lexicon article floppy disks.
TREE List all directories on a file system. Under COHERENT, use the
command:
find / -type d | more
To list all files and directories that are subordinate to the current
directory, use the command:
find . | more
The COHERENT command ls -lR also lists a directory tree, in a somewhat
different output format.
MS-DOS 6.0 and COHERENT
Release 6.0 of MS-DOS offers a feature of dynamic file compression that
creates some difficulties for machines that have both COHERENT and MS-DOS
on their systems.
To begin, MS-DOS 6.0 assumes that it is the only operating system on your
computer. When you install MS-DOS 6.0, by default it overwrites the
COHERENT master boot block. If at all possible, you should install MS-DOS
6.0 onto your system first, then install COHERENT so that its Master
Bootstrap is in control of your machine.
Second, MS-DOS 6.0 offers a compression utility called dblspace, which
compresses MS-DOS file systems on the fly. The COHERENT dos commands do
not understand compressed MS-DOS file systems created by the MS-DOS 6.0
utility dblspace or by such programs as Stacker. If you are running MS-DOS
6.0 with file compression, you must copy files to an uncompressed file
system (for example, to an uncompressed floppy disk or to the uncompressed
host for a compressed file system) to make them accessible to the COHERENT
dos commands.
See Also
COHERENT,
doscat,
doscp,
doscpdir,
dosdel,
dosdir,
dosformat,
doslabel,
dosls,
dosmkdir,
dosrmdir,
floppy disks,
hard disk,
modem,
printer,
terminal,
Using COHERENT




