format (command)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
format
Repository
  • {{URL|example.com|optional display text}}Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Written inMS-DOS: x86 assembly language
FreeDOS: C
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemRT-11, 86-DOS, MS-DOS, PC DOS, OS/2, eComStation, ArcaOS, ISIS-II, iRMX 86, TRIPOS, AmigaDOS, Z80-RIO, OS-9, MSX-DOS, FlexOS, PC-MOS, SpartaDOS X, DR DOS, ROM-DOS, 4690 OS, FreeDOS, PTS-DOS, SISNE plus, Windows, ReactOS
    PlatformCross-platform
    TypeCommand
    LicenseMS-DOS: MIT
    PC-MOS: GPLv3
    FreeDOS: GPLv2
    ReactOS: LGPL-2.0-or-later

    In computing, format is a command-line utility that carries out disk formatting. It is a component of various operating systems, including 86-DOS, MS-DOS, IBM PC DOS and OS/2, Microsoft Windows and ReactOS.

    Overview

    [edit | edit source]

    The command performs the following actions by default on a floppy disk, hard disk drive, solid state (USB), or other magnetic medium (it will not perform these actions on optical media):

    1. clearing the FAT entries by changing them to 0x00
    2. clearing the FAT root directory by changing any values found to 0x00[nb 1][1][2][3]
    3. checking each cluster to see if it is good or bad and marking it as good or bad in the FAT

    Any storage device must have its medium structured to be useful. This process is referred to as "creating a filesystem" in Unix, Linux, or BSD.[4] Under these systems different commands are used. The commands can create many kinds of file systems, including those used by DOS, Windows, and OS/2.

    Implementations

    [edit | edit source]
    FORMAT.COM, among several other commands, in IBM PC DOS 1.0.
    FORMAT.CMD in CP/M-86

    The command is also available in Intel ISIS-II,[5] iRMX 86,[6] MetaComCo TRIPOS,[7] AmigaDOS,[8] Zilog Z80-RIO,[9] Microware OS-9,[10] DR FlexOS,[11] TSL PC-MOS,[12] SpartaDOS X,[13] Datalight ROM-DOS,[14] IBM/Toshiba 4690 OS,[15] PTS-DOS,[16] SISNE plus,[17] and in the DEC RT-11[18] operating system.

    Microsoft DOS and Windows

    [edit | edit source]

    On MS-DOS, the command is available in versions 1 and later.[19]

    Optionally (by adding the /S, for "system" switch), format can also install a Volume Boot Record. With this option, Format writes bootstrap code 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 perform steps 2 and 3 above.[citation needed] Format /Q does not alter data previously written to the media.

    Typing "format" with no parameters in MS-DOS 3.2 or earlier would automatically, without prompting the user, format the current drive; however in MS-DOS 3.3 and later it would simply produce the error: "required parameter missing".[citation needed]

    DR/Novell DOS

    [edit | edit source]

    DR DOS 6.0 includes an implementation of the format command.[20]

    FreeDOS

    [edit | edit source]

    The FreeDOS version was developed by Brian E. Reifsnyder and is licensed under the GPL.[21]

    ReactOS

    [edit | edit source]
    The format command on ReactOS

    The ReactOS implementation is based on a free clone developed by Mark Russinovich for Sysinternals in 1998. It is licensed under the GPL.[22] It was adapted to ReactOS by Emanuele Aliberti in 1999 and supports FAT, FAT32, FATX, EXT2, and BtrFS filesystems.

    See also

    [edit | edit source]

    Notes

    [edit | edit source]
    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 directory entry is set to 0xE5h to create a FAT format usable by PC DOS 1.0-1.1. However, not providing /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 | edit source]
    1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). (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. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). (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. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). (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.)
    4. ^ newfs(8): EXAMPLE section – FreeBSD System Manager's Manual
    5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    7. ^ https://www.pagetable.com/docs/amigados_tripos/tripos_manuals.pdf Archived 2020-10-21 at the Wayback Machine [bare URL PDF]
    8. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    9. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    10. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    11. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    12. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    13. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    14. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    15. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    16. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    17. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    18. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    19. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    20. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    21. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    22. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).

    Further reading

    [edit | edit source]
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    [edit | edit source]