MMSS-DDOOSS -- 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.

_M_S-_D_O_S _v_s. _C_O_H_E_R_E_N_T
MS-DOS differs  significantly from COHERENT in  practically every aspect of
its design.   For example, its  file system is  incompatible with COHERENT;
its  shell  ccoommmmaanndd.ccoomm  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.

_S_i_n_g_l_e-_u_s_e_r 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.
_M_u_l_t_i-_u_s_e_r 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.

_S_i_n_g_l_e-_t_a_s_k_i_n_g 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.   _M_u_l_t_i-_t_a_s_k_i_n_g 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 ffoorrmmaatt,  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 _b_a_c_k_g_r_o_u_n_d -- 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 _U_s_i_n_g _t_h_e _C_O_H_E_R_E_N_T _S_y_s_t_e_m 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 ffllooppppyy  ddiisskkss and hhaarrdd  ddiisskk discuss the  in's and
   out's of  using mass-storage device  with COHERENT.  The  article ffllooppppyy
   ddiisskkss in particular discusses in detail all the steps required to format
   and manipulate MS-DOS-style floppy disks under COHERENT.

-> The  Lexicon articles  mmooddeemm, pprriinntteerr,  and  tteerrmmiinnaall 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 eexxeeccuuttiioonn 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 ccoommmmaannddss 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:

   ddoossccpp   Copy files to/from an MS-DOS file system.

   ddoossccaatt  Concatenate a file on an MS-DOS file system.

   ddoossccpp   Copy a file to/from an MS-DOS file system.

   ddoossccppddiirr
           Copy directories to/from an MS-DOS file system.

   ddoossddeell  Delete files from an MS-DOS file system.

   ddoossddiirr  Show the contents of an MS-DOS directory.

   ddoossffoorrmmaatt
           Write an MS-DOS file system onto a floppy disk.

   ddoossllaabbeell
           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.

   ddoossllss   List contents of an MS-DOS file system.

   ddoossmmkkddiirr
           Create a directory on an MS-DOS file system.

   ddoossrrmm   Remove a file on an MS-DOS file system.

   ddoossrrmmddiirr
           Remove a directory from an MS-DOS file system.

_C_O_H_E_R_E_N_T _E_q_u_i_v_a_l_e_n_t_s _t_o _M_S-_D_O_S _C_o_m_m_a_n_d_s
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.

BBAACCKKUUPP
     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 ccppiioo requires  a formatted, defect free floppy disk, however
     you do  not need to  create a filesystem  on the floppy  disk prior to
     using ccppiioo.

     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 ccppiioo  for details  on this
     command -- especially important if you expect to retrieve your backed-
     up files.

     Note,  too, that  the device  /ddeevv/rrffhhaa00  corresponds to  a 5.25-inch,
     high-density floppy disk in drive 0 (drive A).  See the article ffllooppppyy
     ddiisskkss for a list of the devices that correspond to different sizes and
     configuration of floppy disks.

BBRREEAAKK
     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 kkiillll
     command.  See its Lexicon entry for details on how to use it.

CCHHDDIIRR or CCDD
     Change to another directory.  To do so under COHERENT, use the command

         cd _d_i_r

     where _d_i_r 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 cchhddiirr command.  COHERENT
     has no such restriction.

CCHHKKDDSSKK
     Check  the  integrity  of a  file  system.   Under  COHERENT, use  the
     command:

         /etc/fsck [_o_p_t_i_o_n] [_f_i_l_e_s_y_s_t_e_m]

     _R_e_a_d _t_h_e _L_e_x_i_c_o_n _e_n_t_r_y _o_n ffsscckk _b_e_f_o_r_e _y_o_u _a_t_t_e_m_p_t _t_o _r_u_n _i_t!

CCOOMMPP Compare the contents  of two files.  To do so  under COHERENT, use the
     following command to compare two binary files:

         cmp [_o_p_t_i_o_n] _f_i_l_e_1 _f_i_l_e_2

     ccmmpp displays the bytes which differ between the files.

     To compare the contents of two text files, use the command:

         diff [_o_p_t_i_o_n] _f_i_l_e_1 _f_i_l_e_2

CCOOPPYY Copy the contents of one file  into another; create the target file if
     it does not already exist.  Under COHERENT, say:

         cp _o_l_d_f_i_l_e_n_a_m_e _n_e_w_f_i_l_e_n_a_m_e

     To copy a set of files  into a directory without changing their names,
     use the following form of the command:

         cp _f_i_l_e_1 ... _f_i_l_e_N _d_i_r_e_c_t_o_r_y

DDAATTEE Reset the current date and time.  Under COHERENT, use the command:

         date _y_y_m_m_d_d_h_h_m_m._s_s

     Only the superuser can reset the system's date and time.  When ddaattee is
     used without an argument, it prints  the date and time on the standard
     output.

DDIIRR  Type the contents of a directory.  Under COHERENT, use the command:

         ls -l

DDIIRR/WW
     List  a directory's  contents in columnar  form.  Under  COHERENT, use
     either the command:

         lc

     or the command:

         ls -C

DDIISSKKCCOOPPYY
     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  /ttmmpp/ffiilleennaammee.  For  a  table  of  devices  that
     correspond to other sizes  and configurations of floppy disks, see the
     Lexicon article ffllooppppyy ddiisskkss.

     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 /ttmmpp/ffiilleennaammee  onto the
     target  floppy disk.   Note  that the  target disk  must be  formatted
     before it can receive files;  see the Lexicon article ffllooppppyy ddiisskkss for
     information on how to do this.

EEDDLLIINN
     Perform simple-minded  editing of text files.   Under COHERENT, the eedd
     editor  performs line  editing, but  is  much more  sophisticated than
     eeddlliinn.  COHERENT  also includes the vvii  and MicroEMACS screen editors,
     which are more useful still.

EERRAASSEE or DDEELL
     Remove a file or a directory.  To erase a file, use the command:

         rm _f_i_l_e_1 [... _f_i_l_e_N ]

     To erase a directory, use the command:

         rmdir _d_i_r_e_c_t_o_r_y

     To erase a  directory and all files and directories  below it, use the
     command:

         rm -r _d_i_r_e_c_t_o_r_y

FFIINNDD Find a pattern within a text file.  Under COHERENT, use the command:

         egrep [_o_p_t_i_o_n] _p_a_t_t_e_r_n [_f_i_l_e ...]

     eeggrreepp  is  an extremely  useful  command; see  its  Lexicon entry  for
     details on how to use it.

FFOORRMMAATT
     Format a  floppy disk.  To  format a floppy  disk for MS-DOS,  use the
     command  ddoossffoorrmmaatt. To  format  a floppy  disk for  COHERENT, use  the
     command ffddffoorrmmaatt. For  details, see the respective Lexicon entries for
     these commands.  Under COHERENT, use the command

MMEEMM  Find how much  space is left free on your  hard disk.  Under COHERENT,
     say:

         df [_o_p_t_i_o_n_s]

     See the Lexicon entry on ddff for details.

MMKKDDIIRR
     Create a new directory.  Under COHERENT:

         mkdir _d_i_r_e_c_t_o_r_y ...

MMOODDEE Set  parameters for  terminals  and ports.   Under  COHERENT, use  the
     command ssttttyy.   This command comes with many  options; see its Lexicon
     entry  for details.   The default  speeds of  all ports  and terminals
     reside in file /eettcc/ttttyyss. The superuser  can use a text editor to edit
     this file to change any or all default settings.

MMOORREE Display text a screenful at  a time.  Under COHERENT, use the commands
     mmoorree or ssccaatt.

PPRRIINNTT
     Print  files via  a serial  port.   To print  a file  on a  dot-matrix
     printer, use the command:

         lpr _f_i_l_e_1 [ ... _f_i_l_e_N ]

     To print a file on a Hewlett-Packard LaserJet printer, use the command

         hpr _f_i_l_e_1 [ ... _f_i_l_e_N ]

     Note that  before these commands can be  used, the appropriate devices
     must be linked to your system.  See the Lexicon article on pprriinntteerr 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.

PPRROOMMPPTT
     Change the  ccoommmmaanndd.ccoomm prompt.  The COHERENT  shells store the prompt
     format  within  the  environmental  variable  PPSS11.  This  variable  is
     usually defined in each user's .pprrooffiillee file; this file holds commands
     that are executed whenever the user logs in.  To change the definition
     of your  prompt, edit .pprrooffiillee to define PPSS11  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
     sshh and kksshh for details on those shells and their prompts.

RREENNAAMMEE
     Rename a file.  Under COHERENT, use the command:

         mv _o_l_d_f_i_l_e _n_e_w_f_i_l_e

     mmvv can also be used to move files from one directory or file system to
     another.

RREESSTTOORREE
     Restore a file saved  with the BBAACCKKUUPP command.  Under COHERENT, insert
     the floppy disk upon which  the ccppiioo utility saved its backup archive;
     then type the command:

         cpio -icv < /dev/rfha0

     Note  that  this  command  assumes  you  are using  /ddeevv/rrffhhaa00,  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 ffllooppppyy ddiisskkss.

TTRREEEE 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 llss -llRR also lists a directory tree, in a somewhat
     different output format.

_M_S-_D_O_S _6._0 _a_n_d _C_O_H_E_R_E_N_T
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  ddbbllssppaaccee, which
compresses MS-DOS  file systems on  the fly.  The COHERENT  ddooss commands do
not understand  compressed MS-DOS  file systems  created by the  MS-DOS 6.0
utility ddbbllssppaaccee or by such programs  as SSttaacckkeerr. 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
ddooss commands.

_S_e_e _A_l_s_o
CCOOHHEERREENNTT,  ddoossccaatt, ddoossccpp,  ddoossccppddiirr, ddoossddeell,  ddoossddiirr,  ddoossffoorrmmaatt, ddoossllaabbeell,
ddoossllss,  ddoossmmkkddiirr,  ddoossrrmmddiirr,  ffllooppppyy  ddiisskkss,  hhaarrdd  ddiisskk,  mmooddeemm,  pprriinntteerr,
tteerrmmiinnaall, UUssiinngg CCOOHHEERREENNTT
