dos(1) dos(1)
NAME
dos: doscat, doscp, dosdir, dosformat, dosmkdir, dosls, dosrm,
dosrmdir - access and manipulate DOS files
SYNOPSIS
doscat [-r | -m] file . . .
doscp [-R] [-r | -m] file1 file2
doscp [-r | -m] file . . . directory
dosdir directory
dosformat [-fqv] drive
dosls directory . . .
dosmkdir directory . . .
dosrm [-R] file . . .
dosrmdir directory . . .
DESCRIPTION
The dos commands allow access to files and directories on a
DOS hard disk partition or diskette. The DOS partition must
be bootable, although not active.
Below is a description of the dos commands:
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. If
neither option is given, -r is assumed.
doscp Copies files from/to a DOS diskette or a DOS hard
disk partition to/from a UNIX file system. doscp
will rename a file while it is copying. For
example, the command:
doscp a:file1 file2
copies the file named file1 from the DOS disk to
the UNIX file system and renames it file2.
If directory is given, one or more files are
copied to that directory. If -R is given,
recursive copying of DOS files to UNIX and UNIX
files to DOS is allowed. If -r is given, the
files are copied without new line conversions. If
-m is given, the files are copied with newline
conversions.
Copyright 1994 Novell, Inc. Page 1
dos(1) dos(1)
doscp cannot be used to copy files between two
floppy drives.
dosdir Lists DOS files in the standard DOS style
directory format. (See the DOS DIR command.)
dosformat Creates a DOS 2.0 formatted diskette. It cannot
be used to format a hard disk partition. The
drive must be specified using the UNIX special
file names. For example, if your system has two
floppy drives, the first a 3.5" and the second a
5.25", then the following special file names would
be used to format low and high density floppies:
DOS Format| UNIX special file name
__________|________________________
1.4 MB | /dev/rdsk/f03ht
720 KB | /dev/rdsk/f03dt
1.2 MB | /dev/rdsk/f15ht
360 KB | /dev/rdsk/f15d9t
In the above special file names, f0 refers to the
first floppy drive, and f1 refers to the second
floppy drive.
The -f option suppresses the interactive feature.
The -q (quiet) option is used to suppress
information normally displayed during dosformat,
but it 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.
The -2 option is supplied for compatibility and
does not affect dosformat.
dosls Lists DOS directories and files in a UNIX system
style format [see ls(1)].
dosrm Removes DOS files. If -R is given, recursive
copying of DOS files to UNIX and UNIX files to DOS
is allowed.
dosmkdir Creates DOS directories.
dosrmdir Deletes DOS directories.
Copyright 1994 Novell, Inc. Page 2
dos(1) dos(1)
The file and directory arguments for DOS files and directories
have the form:
device:name
where device is a UNIX system path name for the special device
file containing the DOS disk, and name is a path name to a
file or directory on the DOS disk. The two components are
separated by a colon (:). For example, the argument:
/dev/rdsk/f0t:/src/file.asm
specifies the DOS file file.asm in the directory /src on
diskette /dev/rdsk/f0t. Note that slashes (and not
backslashes) are used as file name separators for DOS path
names. Arguments without a device: are assumed to be UNIX
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 path names. It may contain
the following lines:
A=/dev/rdsk/f0t
C=/dev/rdsk/0s5
D=/dev/rdsk/1s5
The drive letter A may be used in place of special device file
path name /dev/rdsk/f0t 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.
The commands operate on the following types of disks:
DOS partitions on a hard disk
5-1/4 inch DOS
3-1/2 inch DOS
8, 9, 15, or 18 sectors per track
40 tracks per side
1 or 2 sides
DOS versions 1.0, 2.0, or 3.0
In the case of doscp, certain name conversions can be
performed when copying a UNIX system file. File names with a
base name longer than eight characters are truncated.
Filename extensions (the part of the name following the
Copyright 1994 Novell, Inc. Page 3
dos(1) dos(1)
separating period) longer than three characters are truncated.
For example, the file 123456789.12345 becomes 12345678.123. A
message informs the user that the name has been changed and
the altered name is displayed. File names containing illegal
DOS characters are stripped when writing to the DOS format. A
message informs the user that characters have been removed and
displays the name as written.
All DOS text files use a carriage-return/linefeed combination,
CR-LF, to indicate a newline. UNIX system text files use a
single newline LF character. When the doscat and doscp
commands transfer DOS text files to UNIX system text files,
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 ensure 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/rdsk/f0t:tmp/output.1
doscat A:prog/output.1
dosdir /dev/rdsk/f0t:/prog
dosdir /D:/prog
doscp /mine/file.out /dev/rdsk/f0t:/mine/file.2
doscp /tmp/f1 /tmp/f2 D:
dosformat /dev/rdsk/f0d8dt
dosls /dev/rdsk/f0t:/src
dosls B:
dosmkdir /dev/fd0:/usr/docs
dosrm /dev/rdsk/f0t:/docs/memo.txt
dosrm /A:/docs/memo1.txt
dosrmdir /dev/rdsk/f0t:/usr/docs
Copyright 1994 Novell, Inc. Page 4
dos(1) dos(1)
FILES
/etc/default/msdos Default information
/dev/rdsk/f0t Floppy disk devices
/dev/rdsk/0s5 Hard disk devices
REFERENCES
directory(3C)
See your MS-DOS Documentation.
NOTICES
The programs mentioned above cooperate among themselves so no
two programs will access the same DOS disk simultaneously. If
a process attempts to access a device already in use, it
displays the error message Device Busy, and exits with an exit
code of 1.
The device argument to dosformat must be specific. For
example, use /dev/rdsk/f03ht not /dev/rdsk/f0t or a:.
The DOS partition hard disk device names correspond as
follows:
/dev/dsk/0s5 is equivalent to /dev/hd0d
/dev/rdsk/0s5 is equivalent to /dev/rhd0d
/dev/dsk/1s5 is equivalent to /dev/hd1d
/dev/rdsk/1s5 is equivalent to /dev/rhd1d
All of the DOS utilities leave temporary files in /tmp. These
files are automatically removed when the system is rebooted.
They can also be manually removed.
You must have DOS 3.3 or earlier. Extended DOS partitions are
not supported.
Copyright 1994 Novell, Inc. Page 5