dossette(1) —
NAME
dossette − DOS file and media utility
SYNOPSIS
dossette
dosdir [ dosfile ]
dostype dosfile
doscopy dosfile1 dosfile2
dosrename dosfile1 dosfile2
doserase dosfile [
dosmkdir dosdirectory [
dosrmdir dosdirectory [
dosformat [ −8 | −9 | −15 | −18 ] [ −1 | −2 ] [ −40 | −80 ]
[ −320 | −360 | −720 | −1.2 | −1.44 ]
[ −b=bootblock ] [ −v=volname ] [ devspec ]
dosget [ −a ] [ −b ] dosfile [ unixtarget
dosput [ −a ] [ −b ] unixfile [ dostarget
DESCRIPTION
The dossette utility provides the ability to manipulate MS-DOS (DOS) format file systems under the UNIX System, and to move files between DOS and UNIX System file systems. It works with DOS diskettes and fixed disk partitions.
Device Specifiers
The dossette utility recognizes the following DOS-like device specifiers:
| Drive | Device |
| A | /dev/rdsk/f0d9dt or /dev/rdsk/f0q15dt or /dev/rdsk/f0q9dt |
| or /dev/rdsk/f0d8dt or /dev/rdsk/f0q18dt | |
| (will auto-select) (first diskette) | |
| B | /dev/rdsk/f1d9dt or /dev/rdsk/f1q15dt or /dev/rdsk/f1q9dt |
| or /dev/rdsk/f1d8dt or /dev/rdsk/f1q18dt | |
| C | DOS partition on first fixed disk |
| D | DOS partition on second fixed disk |
| . | |
| . | |
| . |
The fixed disk contains a maximum of 15 usable partitions, numbered 2 through 16. The DOS device specifiers C through Q identify these partitions to dossette. The C device specifier is used to access partition 2. The D device specifier is used to access partition 3, etc.
If an attempt is made to access a diskette or fixed disk partition that is not in DOS format, dossette issues an error message identifying that diskette or fixed disk partition.
The current device is always set to A when the program begins execution.
File Names
A DOS-format file name consists of an optional device specifier (from the set a: through q:), an optional path name, and the name of the file, which can also be omitted in some cases. If the device specifier is omitted, the current device is assumed. If there is no path name, the current directory on the specified device is used. Thus, a file name of foo means file foo in the current directory on the current DOS device. A file name of b:/util/foo refers to a file named foo in the directory /util in a DOS file system on the second diskette drive. If a file name consists solely of a device specifier, which is legal only as the target of a put or copy command (see below), it refers to the current working directory on that device.
Note that the treatment of wildcard characters here follows the conventions of the UNIX System rather than those of DOS. For example, in dossette the single command:
A> erase ∗
removes all files (except directories) in the current directory. Under DOS:
A> erase ∗.∗
is required to achieve the same effect.
The components of both UNIX System and DOS path names are separated by a slash (/). (The backslash character is not valid in dossette.) As a result, the two types of path names frequently look identical. However, commands that require both UNIX System and DOS file names in the same line have unambiguous syntax.
Interactive Commands
The dossette utility has both an interactive mode and a batch mode. When invoked with the name dossette, it comes up in interactive mode and reads DOS-like command lines from its standard input, executing each line as it is read. The program issues a prompt at the beginning of each line (e.g., A>, B>, etc.) to indicate the current device, as in DOS. The current device can be changed in familiar fashion by entering a different device letter followed immediately by a colon and new-line character.
dossette supports the following DOS-like set of commands in interactive mode:
dir [ dosfile ]
List DOS directory information. The optional dosfile may be either a file or a directory. If dosfile is absent, the contents of the current directory on the current device are listed. If dosfile contains wildcard characters, directory data for all matching files is displayed.
type dosfile
The DOS ASCII file dosfile is written to the standard output. Carriage-return/line-feed sequences are converted to new-line characters.
copy dosfile1 dosfile2
copy dosfile [ ... ] dosdirectory
Copy a file or files from DOS to DOS. If more than one source file is named, the target must be a DOS directory. Source files and targets may be on different devices or in different directories, but they must all be in DOS-format file systems.
rename dosfile1 dosfile2
Change the name of a DOS file. The existing file dosfile1 is renamed to dosfile2 in the same directory. Unlike its UNIX System counterpart mv (see cp(1)), the dossette rename command cannot move a file to a different directory or device.
erase dosfile [ ... ]
del dosfile [ ... ]
Remove DOS files. The named files are deleted from the DOS file system.
mkdir dosdirectory
md dosdirectory
Create a DOS subdirectory. A subdirectory is created with the name dosdirectory.
rmdir dosdirectory
rd dosdirectory
Remove a DOS subdirectory. The empty subdirectory dosdirectory is removed.
format [ −b=bootblock ] [ −v=volname ]
[ −8 | −9 | −15 | −18 ] [ −1 | −2 ] [ −40 | −80 ]
[ −320 | −360 | −720 | −1.2 | −1.44 ]
[ devicespec ]
The named device (or, by default, the current device) is physically formatted and then initialized with an empty DOS file system. The device must be a diskette; formatting a fixed disk partition can be a serious matter and is a service that dossette does not provide.
The following parameters control the formatting operation:
−b=bootblock
Specify the file that contains the DOS bootstrap for the diskette. The default file is /usr/lib/dos.boot.
−v=volname
Write a volume label of volname into the empty file system.
−1 Format the diskette as single-sided.
−2 Format the diskette as double-sided. This is the default.
−8 Format the diskette with 8 sectors per track. This option is only supported for 5 ¼-inch media.
−9 Format the diskette with 9 sectors per track. This is the default. This option will work with both 3 ½-inch and 5 ¼-inch double density media.
−15 Format the diskette with 15 sectors per track. This option is only supported for 5 ¼-inch high density media.
−18 Format the diskette with 18 sectors per track. This option is only supported for 3 ½-inch media.
−40 Format the diskette with 40 tracks per side. This option is the default. This option is only supported for 5 ¼-inch media.
−80 Format the diskette with 80 tracks per side.
−320 Format the diskette to 320Kb capacity, with 2 sides, 8 sectors per track, and 40 tracks per side. This is equivalent to using −2 −8 −40. This is the format of PC-DOS 1.x disks.
−360 Format the diskette to 360Kb capacity, with 2 sides, 9 sectors per track, and 40 tracks per side. This is equivalent to using −2 −9 −40. This is the default. This is the format of PC-DOS 2.x and later low density disks.
−720 Format the diskette to 720Kb capacity, with 2 sides, 9 sectors per track, and 80 tracks per side. This is equivalent to using −2 −9 −80. This is the format of low density 3 ½-inch disks.
−1.2 Format the diskette to 1.2MB capacity, with 2 sides, 15 sectors per track, and 80 tracks per side. This is equivalent to using −2 −15 −80. This is the format of the high density 5 ¼-inch disks used on the IBM PC AT.
−1.44 Format the diskette to 1.44MB capacity, with 2 sides, 18 sectors per track, and 80 tracks per side. This is equivalent to using −2 −18 −80. This is the format of the high density 3 ½-inch disks used in many portables.
get [ −a | −b ] dosfile unixfile
get [ −a | −b ] dosfile [ ... ] unixdirectory
Copy a file or files from DOS to the UNIX System. The DOS file dosfile is copied into the UNIX System file unixfile, or, if there are multiple source files, the target must be an existing UNIX System directory. Wildcard characters are permitted in source file names only. The −a (ASCII) option tells dossette to convert carriage-return/line-feed sequences to new-line characters during the copy. The −b (binary) option specifies no character translation. These options have no default. If neither option is present, the get command examines each file and attempts to decide whether a binary or ASCII copy should be made.
put [ −a | −b ] unixfile dosfile
put [ −a | −b ] unixfile [ ... ] dosdirectory
Copy a file or files from the UNIX System to DOS. The UNIX System file unixfile is copied into the DOS file dosfile, or, if there are multiple source files, the target must be an existing DOS directory. Wildcard characters are permitted in source file names only. The −a (ASCII) option tells dossette to convert new-line characters to carriage-return/line-feed sequences during the copy. The −b (binary) option specifies no character translation. These options have no default. If neither option is present, the put command examines each file and attempts to decide whether a binary or ASCII copy should be done.
cd [ dosdirectory ]
Change or display the DOS working directory on the current device. cd with no arguments writes to standard output the path name of the working directory on the current device. If an argument is present, it specifies the new working directory for the current device. Note that a separate working directory is maintained for each device.
chloc unixdirectory
Change the UNIX System working directory to unixdirectory. This is useful when getting or putting files to and from several different UNIX System directories.
a: Change the default DOS device to A, which corresponds to the first diskette drive.
b: Change the default DOS device to B, which corresponds to the second diskette drive.
c: ... q: Change the default DOS device to the fixed disk partition that corresponds to the device specifier used. The C device specifier corresponds to the second partition on the fixed disk. The D device specifier corresponds to the third partition on the fixed disk. This pattern continues through device specifier Q which corresponds to the sixteenth and last fixed disk partition.
! command [ arg ... ]
Invoke a shell to execute the command with the args. This is useful for looking at UNIX System directories and files without leaving dossette.
help List the available dossette commands on the standard output.
q Exit dossette.
Batch Mode Commands
The batch mode interface permits dossette commands to be invoked noninteractively in shell scripts. Whenever the program is invoked by a name other than dossette, the invoking name is interpreted as a command, and the remaining command line arguments are used as arguments to that command. The syntax of each batch mode command matches that of the corresponding interactive command.
Some interactive functions, e.g., cd, are not meaningful in batch mode and therefore are not supported. The batch mode commands are:
dosdir
dostype
doscopy
dosrename
doserase
dosmkdir
dosrmdir
dosformat
dosget
dosput
WARNINGS
When using wildcard characters with dossette batch mode commands, take care to hide them from the UNIX System shell by quoting them when it is appropriate to do so. For example:
WRONG:
dosget ∗.c /t/kens/srcdir
RIGHT:
dosget “∗.c” /t/kens/srcdir
However:
RIGHT:
dosput /t/kens/srcdir/∗.c a:/chris/dossrc
RIGHT:
dosput “/t/kens/srcdir/∗.c” a:/chris/dossrc
In the first example, the “∗.c” is expanded by the shell with (possibly nonexistent) UNIX System file names, yielding error messages at best and wrong results at worst. In the second example, the wild card character is quoted, and is therefore passed in to dossette for proper expansion. In the third and fourth sample lines shown above, however, the quoting is moot; if the source file name specification is not quoted, the shell expands it correctly into a list of file names. If it is quoted, then the wildcard character is passed to dossette, which expands it the same way the shell would have.
Console messages such as:
FD0: data overrun
may appear while dossette attempts to determine the characteristics of the diskette (such as density, number of tracks, and sectors per track.) These messages may be safely ignored.
ADDED VALUE
This entry, supplied by INTERACTIVE Systems Corporation, is an extension of UNIX System V.
\*U — Version 1.0