Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dos(C) — Xenix 2.3.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

assign(C)

dtype(C)



     DOS(C)                   XENIX System V                    DOS(C)



     Name
          dos, doscat, doscp, dosdir, dosformat, dosls, dosrm,
          dosrmdir - Access DOS files.

     Syntax
          doscat [ -r | -m ] file ...

          doscp [ -r | -m ] file1 file2

          doscp [ -r | -m ] file ...  directory

          dosdir directory ...

          dosformat [ -fqv ] drive

          dosls directory ...

          dosmkdir directory ...

          dosrm file ...

          dosrmdir directory ...

     Description
          The dos commands provide access to the files and directories
          on MS-DOS disks and on a DOS partition of the hard disk.
          The commands perform the following actions:

          doscat      Copies one or more DOS files to the standard
                      output.  If -r is given, the files are copied
                      without newline conversions.  If -m is given,
                      the files are copied with newline conversions
                      (see ``Conversions'' below).

          doscp       Copies files between a DOS disk and a XENIX
                      filesystem.  If file1 and file2 are given, file1
                      is copied to file2.  If a directory is given,
                      one or more files are copied to that directory.
                      If -r is given, the files are copied without
                      newline conversions.  If -m is given, the files
                      are copied with newline conversions (see
                      ``Conversions'' below).

          dosdir      Lists DOS files in the standard DOS style
                      directory format.

          dosformat   Creates a DOS 2.0 formatted diskette.  The drive
                      may be specified in either DOS drive convention,
                      using the default file /etc/default/msdos, or
                      using the  special file name.  The -f option
                      suppresses the interactive feature.  The -q
                      (quiet) option is used to suppress information



     Page 1                                           (printed 8/7/87)





     DOS(C)                   XENIX System V                    DOS(C)



                      normally displayed during dosformat . The -q
                      option does not suppress the interactive
                      feature.  The -v option prompts the user for a
                      volume label after the diskette has been
                      formatted.  The maximum size of the volume label
                      is 11 characters.

          dosls       Lists DOS directories and files in a  style (see
                      ls(C)).

          dosrm       Removes files from a DOS disk.

          dosmkdir    Creates a directory on a DOS disk.

          dosrmdir    Deletes directories from a DOS disk.

          The file and directory arguments for DOS files and
          directories have the form:

               device:name

          where device is a XENIX pathname for the special device file
          containing the DOS disk, and name is a pathname to a file or
          directory on the DOS disk. The two components are separated
          by a colon (:).  For example, the argument:

               /dev/fd0:/src/file.asm

          specifies the DOS file, file.asm, in the directory, /src, on
          the disk in the device file /dev/fd0.  Note that slashes
          (and not backslashes) are used as filename separators for
          DOS pathnames.  Arguments without a device: are assumed to
          be XENIX files.

          For convenience, the user configurable default file,
          /etc/default/msdos, can define DOS drive names to be used in
          place of the special device file pathnames. It may contain
          the following lines:

               A=/dev/fd0
               C=/dev/hd0d
               D=/dev/hd1d

          The drive letter ``A'' may be used in place of special
          device file pathname /dev/fd0 when referencing DOS files
          (see ``Examples'' below). The drive letter ``C'' or ``D''
          refer to the DOS  partition on the first or second hard
          disk.







     Page 2                                           (printed 8/7/87)





     DOS(C)                   XENIX System V                    DOS(C)



          The commands operate on the following kinds of disks:

               DOS partitions on a hard disk
               5 1/4 inch DOS
               8 or 9 sectors per track
               40 tracks per side
               1 or 2 sides
               DOS versions 1.0, 2.0 or 3.0

     Conversions
          All DOS text files use a carriage-return/linefeed
          combination, CR-LF , to indicate a newline.  XENIX uses a
          single newline LF character.  When the doscat and doscp
          commands transfer DOS text files to XENIX , they
          automatically strip the CR.  When text files are transferred
          to DOS , the commands insert a CR before each LF character.

          Under some circumstances the automatic newline conversions
          do not occur.  The -m option may be used to insure the
          newline conversion.  The -r option can be used to override
          the automatic conversion and force the command to perform a
          true byte copy regardless of file type.

     Examples
               doscat /dev/fd0:/docs/memo.txt
               doscat /tmp/f1 /tmp/f2 /dev/fd0:/src/file.asm

               dosdir /dev/fd0:/src
               dosdir A:/src A:/dev

               doscp /tmp/myfile.txt /dev/fd0:/docs/memo.txt
               doscp /tmp/f1 /tmp/f2 /dev/fd0:/mydir

               dosformat A:
               dosformat /dev/fd0

               dosls /dev/fd0:/src
               dosls B:

               dosmkdir /dev/fd0:/usr/docs

               dosrm /dev/fd0:/docs/memo.txt
               dosrm A:/docs/memo1.txt

               dosrmdir /dev/fd0:/usr/docs

     Files
          /etc/default/msdos  Default information

          /dev/fd*       Floppy disk devices

          /dev/hd*       Hard disk devices



     Page 3                                           (printed 8/7/87)





     DOS(C)                   XENIX System V                    DOS(C)



     See Also
          assign(C), dtype(C)

     Notes
          It is not possible to refer to DOS directories with wild
          card specifications.  The programs mentioned above cooperate
          among themselves so no two programs will access the same DOS
          disk.  Only one process will access a given DOS disk at any
          time, while other processes wait.  If a process has to wait
          too long, it displays the error message, ``can't seize a
          device,'' and exits with an exit code of 1.

          The following hard disk devices:

               /dev/hd0d
               /dev/rhd0d
               /dev/hd1d
               /dev/rhd1d

          are similar to /dev/hd0a in that the disk driver determines
          which partition is the DOS partition and uses that as hd?d.
          This means that software using the DOS partition does not
          need to know which partition is DOS (the disk driver
          determines that).

          The  Development System supports the creation of DOS
          executable files, using cc (CP).  Refer to the  C User's
          Guide and C Library Guide for more information on using  to
          create programs suitable for DOS systems.


























     Page 4                                           (printed 8/7/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026