- Format (command)
Format, in a DOS or Windows system, is a command line utility that performs the following actions on magnetic media:
#The boot record is placed in the location specified by the partition table.
#The FAT entries are cleared by changing them to 0x00.
#The root directory is cleared out by changing any values found to 0x00.
#Format then checks each cluster to see if it is good or bad and marks it in the FAT.Unless you are using this command on a floppy disk and are using the /U switch, the data area is untouched. Data previously written to the media is still intact until it is overwritten when the cluster is reassigned to new data.
The format command must also be used in order to change a disk file system, as many operating systems will allow users to select the file system to format in.
On early versions of MS-DOS, the default location was usually the first floppy drive (DRIVE A:); on later versions that supported hard disk drives, that was changed to the hard disk (DRIVE C:).
These new versions of DOS had unexpected consequences; occasionally a user would learn the hard way that the command:
FORMAT [no options]
formatted the hard disk (DRIVE C:) by default. This could be disconcerting to a user who has just inserted a floppy disk, listed its directory (DIR), and been informed that no directory existed. The default had been the first floppy drive in earlier versions of MS-DOS, but the designers of MS-DOS had found it convenient to change the default to the most-used drive when hard disk drives were supported. For the developers, deleting the operating system would not have been a major problem, because they could easily replace it, but for a customer, losing the operating system—and several months' work—could be catastrophic.
Wikimedia Foundation. 2010.