DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Working with DOS

DOS devices under the UNIX system

The SCO OpenServer system sees every piece of equipment attached to the computer as a file; it communicates with devices such as mass storage systems and printers by reading from and writing to special device files stored in /dev. Each device file has a name that corresponds to the physical attributes of the device itself. For details of the naming of devices, see ``Identifying device files''.

The hard disk can be divided into one or more partitions, each of which is accessed in the same way, using a device file. The DOS partition on the hard disk is accessed through /dev/hd0d for the first hard disk, and /dev/hd1d for a second hard disk.

To eliminate the necessity to remember the various device files, a file exists that lets your system administrator define DOS drive names that you can use in place of UNIX device files. This file is called /etc/default/msdos, and, by default, includes the following entries:

   A=/dev/fd096ds15
   B=/dev/fd048ds9
   C=/dev/dsk/0sC
   D=/dev/dsk/0sD
This means that when you are using the DOS utilities, you can use A:, B:, C:, and D: instead of /dev/fd096ds15, /dev/fd048ds9, /dev/dsk/0sC, and /dev/dsk/0sD respectively. For example:
   /dev/fd096ds15:/john/memos
can be replaced with:
   A:/john/memos

The drive letter B: refers to a low density (48ds9) primary floppy drive. Drive letter C: refers to the primary DOS partition on the primary hard drive. D: refers to a logical drive in the extended DOS partition.


NOTE: If you get the message cannot open /dev/dsk/0sC (or similar message), check the user permissions on the special device file involved. As root, change the permissions with the chmod command. For example:

chmod 666 /dev/dsk/0sC

gives full read and write permissions to all users for the special device file /dev/dsk/0sC, which is the DOS partition on the primary hard disk.


In addition to the DOS utilities described in this chapter, you can also use the dd(C), diskcp(C), and diskcmp(C) commands to copy and compare DOS floppies, and the dtype(C) command to find out what type of floppies you have.


Next topic: DOS filenames
Previous topic: Working with DOS

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003