Format (command) explained

format
Programming Language:MS-DOS

x86 assembly language
FreeDOS: C

Operating System:RT-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
Platform:Cross-platform
Genre:Command
License:MS-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

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
  2. clearing the FAT root directory by changing any values found to [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. 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

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

Microsoft DOS and Windows

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

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. 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".

DR/Novell DOS

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

FreeDOS

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

ReactOS

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

See also

Notes

  1. Web site: Tim. Paterson. Tim Paterson. Microsoft DOS V1.1 and V2.0: /msdos/v20source/FORMAT.TXT. Computer History Museum, Microsoft. 2013-12-19. 1983. 2014-03-25. 2019-08-14. https://web.archive.org/web/20190814021325/https://www.computerhistory.org/atchm/microsoft-research-license-agreement-msdos-v1-1-v2-0/. live. (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. Web site: Microsoft MS-DOS early source code. Software Gems: The Computer History Museum Historical Source Code Series. Len. Shustek. 2014-03-24. 2014-03-29. 2019-08-10. https://web.archive.org/web/20190810045508/https://www.computerhistory.org/atchm/microsoft-ms-dos-early-source-code/. live. (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. Web site: Microsoft makes source code for MS-DOS and Word for Windows available to public. 2014-03-25. Roy. Levin. Official Microsoft Blog. 2014-03-29. https://web.archive.org/web/20140328094124/http://blogs.technet.com/b/microsoft_blog/archive/2014/03/25/microsoft-makes-source-code-for-ms-dos-and-word-for-windows-available-to-public.aspx. 2014-03-28. dead. (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. Web site: ISIS II Users Guide . 2019-02-03 . 2019-01-26 . https://web.archive.org/web/20190126011055/http://bitsavers.org/pdf/intel/ISIS_II/9800306-06_ISIS-II_Users_Guide_May81.pdf . live .
  5. Web site: intel :: iRMX :: 146194-001 irmxR6Intro. Internet Archive.
  6. https://www.pagetable.com/docs/amigados_tripos/tripos_manuals.pdf
  7. Book: Quick reference. archive.org. 1988. 9781557550491. 2020-09-14. Rugheimer. Hannes. Abacus .
  8. Web site: Z80-RIO OPERATING SYSTEM USER'S MANUAL . 2020-02-14 . 2022-01-28 . https://web.archive.org/web/20220128041146/https://www.z80cpu.eu/mirrors/oldcomputers.dyndns.org/public/pub/rechner/zilog/zds/z80-rio_os_userman.pdf . live .
  9. Book: Paul S. Dayan. 1992. The OS-9 Guru - 1 : The Facts. Galactic Industrial Limited. 0-9519228-0-7.
  10. Web site: FlexOS User's Guide . 1986 . www.bitsavers.org . 2020-09-14 . 2019-09-25 . https://web.archive.org/web/20190925131719/http://bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf . dead .
  11. Web site: roelandjansen/pcmos386v501. GitHub. 2 January 2022. 28 July 2019. 4 May 2021. https://web.archive.org/web/20210504053616/https://github.com/roelandjansen/pcmos386v501. live.
  12. Web site: SpartaDOS X 4.48 User Guide . 2019-03-16 . 2021-10-10 . https://web.archive.org/web/20211010113045/http://sdx.atari8.info/sdx_files/4.48/SDX448_User_Guide.pdf . live .
  13. Web site: Datalight ROM-DOS User's Guide. www.datalight.com. 2020-01-18. 2019-04-21. https://web.archive.org/web/20190421143059/https://www.datalight.com/assets/files/ROM-DOS_Users_Guide.pdf. live.
  14. Web site: Users guide. archive.org. 2020-09-14.
  15. Web site: PTS-DOS 2000 Pro User Manual . . Buggingen, Germany . 1999 . 2018-05-12 . live . https://web.archive.org/web/20180512094512/http://download.paragon-software.com/doc/manual_dos_eng.pdf . 2018-05-12.
  16. Web site: SISNE plus - Referência Sumária. May 14, 2015. Datassette. September 28, 2019. September 28, 2019. https://web.archive.org/web/20190928211058/https://datassette.org/manuais/ibm-pc/sisne-plus-referencia-sumaria. live.
  17. Web site: RT-11 HELP FILE. paleoferrosaurus.com. 2018-07-16. 2018-07-17. https://web.archive.org/web/20180717041552/http://paleoferrosaurus.com/beta/documents/rt11help.html#FORMAT. dead.
  18. Book: Wolverton. Van. Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. 2003. Microsoft Press. 0-7356-1812-7.
  19. Web site: DR DOS 6.0 User Guide Optimisation and Configuration Tips . 2019-08-12 . 2019-09-30 . https://web.archive.org/web/20190930135943/http://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf . live .
  20. Web site: ibiblio.org FreeDOS Package -- Format (FreeDOS Base). www.ibiblio.org. 2018-11-13. 2018-11-19. https://web.archive.org/web/20181119030222/http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/format.html. live.
  21. Web site: reactos/reactos. GitHub. 3 January 2022. 9 June 2019. 11 December 2017. https://web.archive.org/web/20171211170155/https://github.com/reactos/reactos. live.

[22]

Further reading

External links