format Command
Purpose
Formats either diskettes or read/write optical media disks.
Syntax
Description
The format command formats diskettes in the diskette drive specified by the Device parameter. The format command determines the device type, which can be one of the following:
- 5.25 inch low-density diskette (360 KB) containing 40x2 tracks, each with 9 sectors
- 5.25 inch high-capacity diskette (1.2 MB) containing 80x2 tracks, each with 15 sectors
- 3.5 inch low-density diskette (720 KB) containing 80x2 tracks, each with 9 sectors
- 3.5 inch high-capacity diskette (1.44 MB) containing 80x2 tracks, each with 18 sectors
- 3.5 inch high-capacity diskette (2.88 MB) containing 80x2 tracks, each with 36 sectors
The sector size is 512 bytes for all diskette types.
The format command formats a diskette with the highest capacity that is supported by the diskette drive, unless the Device parameter specifies a different density.
The format command formats a read/write optical disk, if the drive supports setting the Format Options Valid (FOV) bit of the defect list header to 0. To format a read/write optical disk, use the name of the read/write optical drive (such as /dev/romd0) after the -d flag.
Before formatting a diskette or read/write optical disk, the format command prompts for verification. This allows the user to end the operation cleanly.
Flags
| Item | Description |
|---|---|
| -d Device | Specifies the device that is used to format the diskette. If the device name ends with the
letter h, the drive formats the diskette for high density. If the device name ends
with the letter l, the drive formats the diskette for low density. Refer to the
fd special file for
information about valid device types. This flag is used only with the format
command. Attention: If the diskette drive supports a higher capacity than the highest capacity
for which the diskette was manufactured, the capacity of the diskette must be explicitly stated in
the Device parameter (-d Device flag) of
the format command. For example, to format a 1 MB diskette on a 4 MB diskette
drive, specify the diskette capacity in the -d flag as follows:
Failure to do this can cause read and write errors. |
| -f | Formats the diskette without checking for bad tracks, thus formatting the diskette more quickly. This flag applies to diskettes only, not to read/write optical disks. It is used only with the format command. |
| -l | (Lowercase L) Formats a 360 KB diskette in a 5.25 inch, 1.2 MB diskette drive. Formats a 720
KB diskette in a 3.5-inch 1.4 MB diskette drive. This flag applies to diskettes only, not to
read/write optical disks. It is used only with the format command. Attention: A 360 KB diskette drive cannot be able to read a 360 KB diskette that is formatted
in a 1.2 MB drive.
|
Parameters
| Item | Description |
|---|---|
| Device | Specifies the device containing the diskette to be formatted. The default is the /dev/rfd0 device for drive 0. |
Examples
- To format a diskette in the /dev/rfd0 device, enter:
format -d /dev/rfd0 - To format a diskette without checking for bad tracks, enter:
format -f - To format a 360 KB diskette in a 5.25 inch, 1.2 MB diskette drive in the
/dev/rfd1 device, enter:
format -l -d /dev/rfd1 - To format a 3.5 inch, low-density (720 KB) diskette, enter:
format -d /dev/fd0.9 - To format a 3.5 inch, high-capacity (1.44 MB) diskette, enter:
format -d /dev/fd0.18 - To format a read/write optical disk in the /dev/romd0 device, enter:
format -d /dev/romd0
Files
| Item | Description |
|---|---|
| /usr/sbin/format | Contains the format command. |
| /dev/rfd* | Specifies the device parameters. |
| /dev/fd* | Specifies the device parameters. |
| /dev/romd* | Specifies the device parameters. |
| /dev/omd* | Specifies the device parameters. |