format (command)
![]() The MS-DOS format command | |
Operating system | RT-11, 86-DOS, MS-DOS, PC DOS, OS/2, ISIS-II, iRMX 86, TRIPOS, AmigaDOS, OS-9, FlexOS, SpartaDOS X, 4690 OS, FreeDOS, PTS-DOS, Microsoft Windows, ReactOS |
---|---|
Type | Command |
In computing, format
, 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):
- clearing the FAT entries by changing them to 0x00
- clearing the FAT root directory by changing any values found to 0x00[nb 1][1][2][3]
- checking each cluster to see if it is good or bad and marking it as good or bad in the FAT
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".
Any storage device must have its medium structured to be useful. This process is referred to[by whom?] 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
The command is also available in ISIS-II,[5] iRMX 86,[6] TRIPOS[7], AmigaDOS[8], OS-9[9], FlexOS[10], SpartaDOS X,[11] 4690 OS[12], PTS-DOS,[13] and in the DEC RT-11[14] operating system.
The FreeDOS version was developed by Brian E. Reifsnyder.[15]
The ReactOS implementation is based on a free clone developed by Mark Russinovich for Sysinternals in 1998.[16]
See also
- Disk formatting
- Data recovery
- convert
- File Allocation Table
- Design of the FAT file system
- fdisk
- PC DOS 7.10 Format32
Notes
- ^ 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 dire 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
- ^ 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.)
- ^ 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.)
- ^ 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.)
- ^ FreeBSD System Manager's Manual : EXAMPLE section –
- ^ ISIS II Users Guide
- ^ iRMX™86 INTRODUCTION AND OPERATOR'S REFERENCE MANUAL For Release 6
- ^ https://www.pagetable.com/docs/amigados_tripos/tripos_manuals.pdf
- ^ https://archive.org/details/1988-rugheimer-spanik-amigados-quick-reference
- ^ Paul S. Dayan (1992). The OS-9 Guru - 1 : The Facts. Galactic Industrial Limited. ISBN 0-9519228-0-7.
- ^ http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf
- ^ SpartaDOS X 4.48 User Guide
- ^ https://archive.org/details/4690OSV6r2UsersGuide/page/n169
- ^
"PTS-DOS 2000 Pro User Manual" (PDF). Buggingen, Germany: Paragon Technology GmbH. 1999. Archived from the original (PDF) on 2018-05-12. Retrieved 2018-05-12.
{{cite web}}
: Unknown parameter|dead-url=
ignored (|url-status=
suggested) (help) - ^ http://paleoferrosaurus.com/beta/documents/rt11help.html#FORMAT
- ^ http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/format.html
- ^ https://github.com/reactos/reactos/blob/master/base/system/format/format.c
Further reading
- Cooper, Jim (2001). Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. ISBN 978-0789725738.
- Kathy Ivens; Brian Proffit (1993). OS/2 Inside & Out. Osborne McGraw-Hill. ISBN 978-0078818714.
- Frisch, Æleen (2001). Windows 2000 Commands Pocket Reference. O'Reilly. ISBN 978-0-596-00148-3.