Copies DOS files.
The dosread command copies the DOS file specified by the File1 variable to standard output or to the file specified by the File2 variable. If no pathname is specified for the File2 variable, the DOS file is copied to the root directory.
Unless otherwise specified, the dosread command copies the number of bytes specified in the directory entry for the file specified by the File1 variable. This means, in particular, that you cannot copy directories because, by convention, directories have a record size of 0.
Item | Description |
---|---|
-a | Replaces each CR-LF (carriage return, line-feed) key sequence with a new-line character and interprets a Ctrl-Z (ASCII SUB) key sequence as the end-of-line character. |
-DDevice | Specifies the name of the DOS device as /dev/fd0 or /dev/fd1. The default value of the Device variable is /dev/fd0. This device must have the DOS disk format. |
-v | Writes file information to standard output about the format of the disk. Use this flag to verify that a device is a DOS disk. |
dosread -a chap1.doc chap1
This command sequence copies the DOS text file \CHAP1.DOC on default device /dev/fd0 to chap1 in the current directory.dosread -D/dev/fd1 /survey/test.dta /home/fran/testdata
This command sequence copies the DOS data file \SURVEY\TEST.DTA on /dev/fd1 to /home/fran/testdata.dosdir | awk '!/There are/ {print $1}'|xargs -t -i dosread {} {}
This command sequence takes files from the default drive containing
the DOS disk and copies
them to the current directory.Item | Description |
---|---|
/usr/bin/dosread | Contains the dosread command. |
/dev/fd0 | Contains the device name for a diskette drive. |