dosread [ -a ] [ -v ] [ -D Device ] File1 [ File2 ]
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.
You can use DOS file-naming conventions with one exception: the \ (backslash). Because the \ character can have special meaning in DOS, use a / (slash) character as the delimiter to specify subdirectory names in a DOS path name. The dosdir command converts lowercase characters in the file or directory name to uppercase before it checks the disk. Because all file names are assumed to be full (not relative) path names, you need not add the initial / (slash).
Notes:
- The dosread command does not interpret the * and ? (asterisk and question mark) wildcard characters as having special meaning. If you do not specify a file-name extension, the file name is matched as if you had specified a blank extension.
- You cannot customize the name of this command. The command must be named dosread.
- The dosread command reads files from the default drive containing the DOS diskette. The dosread command then copies the files to the current directory as a file recognized by this operating system. If the DOS diskette contains subdirectories, the dosread command does not create corresponding new subdirectories in this operating system. You must create the subdirectory and specify each DOS file you want to copy into the new subdirectory.
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.
/usr/bin/dosread | Contains the dosread command. |
/dev/fd0 | Contains the device name for a diskette drive. |
The awk command, dosdel command, dosdir command, dosformat command, doswrite command, xargs command.
File Systems and Directories Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices.
Files Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices describes files, file types, and how to name files.