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 ...
Below is a description of the dos commands:
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.
doscp cannot be used to copy files between two floppy drives.
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 |
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.
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.
Arguments without a device: prefix 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''). 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:
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 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.
doscat /dev/rdsk/f0t:tmp/output.1 doscat A:prog/output.1dosdir /dev/rdsk/f0t:/prog
dosdir /D:/progdoscp /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.txtdosrmdir /dev/rdsk/f0t:/usr/docs
/etc/default/msdos | Default information |
/dev/rdsk/f0t | Floppy disk devices |
/dev/rdsk/0s5 | Hard disk devices |
/etc/default/msdos Default information /dev/rdsk/f0t Floppy disk devices /dev/rdsk/0s5 Hard disk devices
See your DOS Documentation.
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:
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.