FORMAT (command)

From Wikipedia, the free encyclopedia
  (Redirected from Format (command))
Jump to: navigation, search
FORMAT
A component of Microsoft Windows
Details
Other names DOS, OS/2, Windows 9x

FORMAT is a command-line utility included in Microsoft DOS, IBM OS/2 and Microsoft Windows operating systems to produce disk formatting.

The command 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 entries are cleared by changing them to 0x00.
  2. The FAT root directory is cleared out by changing any values found to 0x00.[nb 1][1][2][3]
  3. Format then checks each cluster 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. 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 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.[citation needed] Data previously written to the media will not be altered by the command.

If you would type "FORMAT" with no parameters in MS-DOS 3.2 or earlier, it would automatically, without prompting the user, format the current drive, however in MS-DOS 3.3 and later it would simply say "required parameter missing".

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.

See also[edit]

Notes[edit]

  1. ^ The directory entries get filled with 0x00 since MS-DOS 1.25 and PC DOS 2.0. If the FORMAT command line option /O is provided, the first byte of each directy entry is set to 0xE5h to create a FAT format useable by PC DOS 1.0-1.1. However, not giving /O will significantly speed up directory searches under MS-DOS 1.25 and PC DOS 2.0 and higher. Older versions of MS-DOS, PC DOS, and 86-DOS only supported the 0xE5 marker.


References[edit]

  1. ^ Paterson, Tim (2013-12-19) [1983]. "Microsoft DOS V1.1 and V2.0: /msdos/v20source/FORMAT.TXT". Computer History Museum, Microsoft. Retrieved 2014-03-25.  (NB. While the publishers claim this would be MS-DOS 1.1 and 2.0, it actually is SCP MS-DOS 1.25 and a mixture of Altos MS-DOS 2.11 and TeleVideo PC DOS 2.11.)
  2. ^ Shustek, Len (2014-03-24). "Microsoft MS-DOS early source code". Software Gems: The Computer History Museum Historical Source Code Series. Retrieved 2014-03-29.  (NB. While the author claims this would be MS-DOS 1.1 and 2.0, it actually is SCP MS-DOS 1.25 and a mixture of Altos MS-DOS 2.11 and TeleVideo PC DOS 2.11.)
  3. ^ Levin, Roy (2014-03-25). "Microsoft makes source code for MS-DOS and Word for Windows available to public". Official Microsoft Blog. Retrieved 2014-03-29.  (NB. While the author claims this would be MS-DOS 1.1 and 2.0, it actually is SCP MS-DOS 1.25 and a mixture of Altos MS-DOS 2.11 and TeleVideo PC DOS 2.11.)

External links[edit]