format Command

Purpose

Formats either diskettes or read/write optical media disks.

Syntax

format [ -d Device ] [ -f ] [ -l ]

Description

Attention: Formatting a diskette or read/write optical disk destroys any existing data on it.

The format command formats diskettes in the diskette drive specified by the Device parameter. The format command determines the device type, which may be one of the following:

The sector size is 512 bytes for all diskette types.

The format command formats a diskette with the highest capacity supported by the diskette drive, unless the Device parameter specifies a different density.

The format command formats a read/write optical disk, provided that 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. For more information, see the DKFORMAT operation of the ioctl subroutine in "scdisk SCSI Device Driver" in AIX® Version 7.1 Technical Reference: Kernel and Subsystems, Volume 2.

Before formatting a diskette or read/write optical disk, the format command prompts for verification. This allows you to end the operation cleanly.

Flags

Item Description
-d Device Specifies the device 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 should be explicitly stated in the Device parameter (-d Device flag) of the format command. For example, to format a 1MB diskette on a 4MB diskette drive, specify the diskette capacity in the -d flag as follows:
-d /dev/fd0.9 for a 1MB diskette

Failure to do this may 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 360KB diskette in a 5.25-inch, 1.2MB diskette drive. Formats a 720KB diskette in a 3.5-inch 1.4MB diskette drive. This flag applies to diskettes only, not to read/write optical disks. It is used only with the format command.
Attention: A 360KB diskette drive may not be able to read a 360KB diskette that has been formatted in a 1.2MB 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

  1. To format a diskette in the /dev/rfd0 device, enter:
    format   -d   /dev/rfd0
  2. To format a diskette without checking for bad tracks, enter:
    format   -f
  3. To format a 360KB diskette in a 5.25-inch, 1.2MB diskette drive in the /dev/rfd1 device, enter:
    format   -l   -d   /dev/rfd1
  4. To format a 3.5-inch, low-density (720KB) diskette, enter:
    format -d /dev/fd0.9
  5. To format a 3.5-inch, high-capacity (1.44MB) diskette, enter:
    format -d /dev/fd0.18
  6. 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.