Format (command)
Encyclopedia
Format is a command-line
Command-line interface
A command-line interface is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks...

 utility included in Microsoft DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

, IBM OS/2
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

 and Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 operating systems to produce disk formatting.

The command
Command (computing)
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell....

 will perform the following actions by default on a floppy drive, hard drive, solid-states (USB), or other magnetic medium. It will not perform this function on optical media.
  1. The FAT
    File Allocation Table
    File Allocation Table is a computer file system architecture now widely used on many computer systems and most memory cards, such as those used with digital cameras. FAT file systems are commonly found on floppy disks, flash memory cards, digital cameras, and many other portable devices because of...

     entries are cleared by changing them to 0x00.
  2. The root directory
    Root directory
    In computer file systems, the root directory is the first or top-most directory in a hierarchy. It can be likened to the root of a tree — the starting point where all branches originate.-Metaphor:...

     is cleared out by changing any values found to 0x00.
  3. Format then checks each cluster
    Cluster (file system)
    In computer file systems, a cluster or allocation unit is the unit of disk space allocation for files and directories. To reduce the overhead of managing on-disk data structures, the filesystem does not allocate individual disk sectors, but contiguous groups of sectors, called clusters.On a disk...

     to see if it is good or bad and marks it in the FAT.


Optionally, (by adding /s, for "system") it can also install a volume boot record
Volume Boot Record
A volume boot record is a type of boot sector introduced by the IBM Personal Computer...

. When this option is included, bootstrap code is written to the first sector of the volume (and possibly elsewhere as well). FORMAT always writes a BIOS Parameter Block
BIOS parameter block
In computing, the BIOS parameter block, often shortened to BPB, is a data structure in the Volume Boot Record describing the physical layout of a data storage volume. On partitioned devices, such as hard disks, the BPB describes the volume partition, whereas, on unpartitioned devices, such as...

 to the first sector, with or without the /S option.

Another option ( /Q) allows for what Microsoft calls "Quick Format". With this option the command will not do the 2nd and 3rd step, above. Data previously written to the media will not be altered by the command.

Any storage device must have its medium structured to be useful. This process is referred to as creating the file system in Unix, Linux, or BSD. Under these systems the more robust command called "mkfs" exists. It creates many kinds of filesystems including those used by DOS, Windows, and OS/2. (e.g. DrDOS)

See also

  • Disk formatting
    Disk formatting
    Disk formatting is the process of preparing a hard disk drive or flexible disk medium for data storage. In some cases, the formatting operation may also create one or more new file systems...

  • Data recovery
    Data recovery
    Data recovery is the process of salvaging data from damaged, failed, corrupted, or inaccessible secondary storage media when it cannot be accessed normally. Often the data are being salvaged from storage media such as internal or external hard disk drives, solid-state drives , USB flash drive,...

  • fdisk
    Fdisk
    On personal computer operating systems, fdisk is a commonly used name for a command-line utility that provides disk partitioning functions...

  • convert
    Convert (command)
    In computing, convert is a command-line utility included in the Windows NT operating system line. It is used to convert volumes using the FAT file systems to NTFS.-External links:*...

  • File Allocation Table
    File Allocation Table
    File Allocation Table is a computer file system architecture now widely used on many computer systems and most memory cards, such as those used with digital cameras. FAT file systems are commonly found on floppy disks, flash memory cards, digital cameras, and many other portable devices because of...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK