
每天一文format命令微軟官網翻譯121114該命令仍需修改FormatFormats a disk to accept Windows files.將一個磁盤格式化來兼容windows文件。格式化究竟操作了什么?目的于何?Syntax語法________________________________________format <Volume> [/fs:{FAT|FAT32|NTFS}] [/v:<Label>] [/q] [/a:<UnitSize>] [/c] [/x] [/p:<asses>]format <Volume> [/v:<Label>] [/q] [/f:<Size>] [/p:<Passes>]format <Volume> [/v:<Label>] [/q] [/t:<Tracks> /n:<Sectors>] [/p:<Passes>]format <Volume> [/v:<Label>] [/q] [/p:<Passes>]format <Volume> [/q]Parameters參數________________________________________ Parameter參數Description描述<Volume><卷>Specifies the mount point, volume name, or drive letter (followed by a colon) of the drive that you want to format. If you do not specify any of the following command-line options, format uses the volume type to determine the default format for the disk.指定你想要格式化的固定的點,卷名稱,或者驅動器字母(后面跟一個冒號)。如果你不指定任何下面的命令行選項,format使用卷類型來決定對磁盤的默認格式化。/fs:{FAT|FAT32|NTFS|UDF}Specifies the type of the file system: FAT, FAT32, NTFS, or UDF. Floppy disks can use only the FAT file system.指定文件系統類型:fat,fat32,ntfs,或者udf。軟盤只能用fat文件系統。這幾種文件類型是怎么回事?決定他們的因素是什么?/v:<Label>Specifies the volume label. If you omit the /v command-line option or use it without specifying a volume label, format prompts you for the volume label after the formatting is complete. Use the syntax /v:to prevent the prompt for a volume label. If you use a single format command to format more than one disk, all of the disks will be given the same volume label.指定卷標。如果你忽略/v參數或者使用它卻不指定卷標,format會在格式化完成以后提示你輸入卷標。使用語法是:/v:為了防止提示輸入卷標。如果你使用單個format命令來格式不知一個磁盤,所有的磁盤將會被設置為統一卷標。/a:<UnitSize>Specifies the allocation unit size to use on FAT, FAT32, or NTFS volumes. If you do not specify UnitSize, it is chosen based on volume size. Default settings are strongly recommended for general use. The following list presents valid values for NTFS, FAT, and FAT32 UnitSize:指定分配單元的大小來使用到fat,fat32,或者ntfs卷。如果你不指定單元大小,他的選擇會基于卷大小。強烈建議一般使用默認設置。下面的列表提出了ntfs,fat和fat32合法的單元大小值:512102420484096819216K32K64KFAT and FAT32 also support 128K and 256K for a sector size greater than 512 bytes.Fat和fat32同樣支持128k和256k作為一個扇區大小大于512字節。/qPerforms a quick format. Deletes the file table and the root directory of a previously formatted volume, but does not perform a sector-by-sector scan for bad areas. You should use the /q command-line option to format only previously formatted volumes that you know are in good condition. Note that /q overrides /p.執行一個快速格式化。刪除文件表和根目錄以前格式化的卷,但是并不會對每個扇區的壞區進行瀏覽。你因該使用/q命令選項來格式化之前格式化過的卷并且你知道該卷處于良好狀態。注意/q會覆蓋/p/f:<Size>Specifies the size of the floppy disk to format. When possible, use this command-line option instead of the /t and /n command-line options. Windows accepts the following values for size:指定軟盤大小來格式化。如果可能,使用這個命令行選項來代替/t和/n命令行選項。Windows兼容以下卷大?。?em>•1440 or 1440k or 1440kb •1.44 or 1.44m or 1.44mb•1.44-MB, double-sided, quadruple-density, 3.5-inch disk四倍密度,3.5英寸磁盤/t:<Tracks>Specifies the number of tracks on the disk. When possible, use the /f command-line option instead. If you use the /t option, you must also use the /n option. These options together provide an alternative method of specifying the size of the disk that is being formatted. This option is not valid with the /f option.指定磁盤上的磁道數。如果可能的話,使用/f命令行來取代。如果使用/t選項,你必須也使用/n選項。這些選項一起提供選擇指定磁盤大小的方法來格式化。這個選項不適用于/f選項。/n:<Sectors>Specifies the number of sectors per track. When possible, use the /f command-line option instead of /n. If you use /n, you must also use /t. These two options together provide an alternative method of specifying the size of the disk that is being formatted. This option is not valid with the /f option.指定每個磁道上的分區數。如果可能,使用/f命令行選項來代替/n。如果你使用/n你必須也使用/t。這兩個選項一起來提供指定磁盤大小的方法。這個選項不適用于/f選項。/p:<Passes>Zeros every sector on the volume for the number of passes specified. This option is not valid with the /q option.為passes中指定的卷清零每個扇區。/cNTFS only. Files created on the new volume will be compressed by default.僅適用于ntfs。建立在新卷上的文件將會默認被壓縮。/xCauses the volume to dismount, if necessary, before it is formatted. Any open handles to the volume will no longer be valid./?Displays help at the command prompt.在命令行中顯示幫助信息。Remarks________________________________________•Administrative credentials 系統管理認證You must be a member of the Administrators group to format a hard drive.你必須作為管理員組的成員來格式化這個硬盤驅動器。 •Using format使用formatThe format command creates a new root directory and file system for the disk. It can also check for bad areas on the disk, and it can delete all data on the disk. To be able to use a new disk, you must first use this command to format the disk.Format命令為磁盤建立一個新的根目錄和文件系統。它同樣可以檢查磁盤上的壞區。并且可以刪除所有磁盤上的數據。為了可以使用一個新的磁盤,你必須首先用這個命令來格式化磁盤。•Adding a volume label 添加一個卷標After formatting a floppy disk, format displays the following message: 格式化完一個軟盤以后,format顯示以下信息:Volume label (11 characters, ENTER for none)?卷標(11個字符,輸入一個)?To add a volume label, type up to 11 characters (including spaces). If you do not want to add a volume label to the disk, press ENTER. 為了添加一個卷標,輸入11字符(包括空格)。如果你不想太你家卷標,直接按回車。•Formatting a hard disk 格式化一個硬盤Note注意You must be a member of the Administrators group to format a hard disk.你必須是管理員組中的一個成員來格式化硬盤When you use the format command to format a hard disk, a warning message similar to the following displays:當你使用format命令來格式化硬盤時,類似于以下的提示信息會顯示:WARNING, ALL DATA ON NON-REMOVABLE DISK DRIVE x: WILL BE LOST! Proceed with Format (Y/N)? _ 警報,所有在non-removable 磁盤上的數據驅動器 x:將會丟失!執行格式化(Y/N)?_To format the hard disk, press Y; if you do not want to format the disk, press N.如果需要格式化輸入Y,如果不需要格式化,按下N•Unit size 單元大小FAT file systems restrict the number of clusters to no more than 65526. FAT32 file systems restrict the number of clusters to between 65527 and 4177917.Fat文件系統限制簇大小不超過65526.Fat32文件系統限制簇大小在65527到4177917之間。NTFS compression is not supported for allocation unit sizes above 4096.Ntfs壓縮不支持單元大小在4096之上。Note注意Format will immediately stop processing if it determines that the previous requirements cannot be met using the specified cluster size.Format將會直接停止運行如果它檢測到之前的請求不能滿足指定的簇大小。•Format messages 格式化信息When formatting is complete, format displays messages that show the total disk space, the spaces marked as defective, and the space available for your files.當格式化完成時,format顯示的信息會告訴你磁盤的總空間,有錯誤的空間,以及可用空間。•Quick formatting 快速格式化You can speed up the formatting process by using the /q command-line option. Use this option only if there are no bad sectors on your hard disk.你可以加快格式化程序通過使用/q命令選項。使用這個選項僅當扇區中沒有錯誤時。•Using format with a reassigned drive or a network drive 對重新分配的驅動器或網絡驅動器格式化You should not use the format command on a drive that was prepared by using the subst command. You cannot format disks over a network.你不可以對一個使用過subst命令的驅動器進行格式化命令。也不可以格式化網絡驅動器。•Format exit codes Format退出代碼The following table lists each exit code and a brief description of its meaning. 下面的表格列出了每個退出代號和和簡明的描述信息。 Exit code退出代碼Description描述信息0The format operation was successful.格式化成功執行1Incorrect parameters were supplied.應用了錯誤的參數4A fatal error occurred (which is any error other than 0, 1, or 5).發生了重大錯誤(與0,1,5不同的錯誤)5The user pressed N in response to the prompt Proceed with Format (Y/N)? to stop the process.使用者選擇了N來取人是否進行格式化(Y/N)來結束了格式化程序。You can check these exit codes by using the ERRORLEVEL environment variable with the if batch command.你可以通過使用errorlevel環境變量檢查這些退出代碼。•Using format at the Recovery Console 在可恢復控制臺中使用formatThe format command, with different parameters, is available from the Recovery Console.該命令所有參數均可應用于可恢復控制臺。Examples例子________________________________________To format a new floppy disk in drive A using the default size, type:為了格式化一個新軟盤驅動器A,輸入:format a:To perform a quick format operation on a previously formatted floppy disk in drive A, type:為了對之前格式化過的軟盤A進行一個快速格式化操作,輸入:format a: /qTo format a floppy disk in drive A and assign it the volume label DATA, type:為了格式化一個軟盤A并標記卷標為”DATA,輸入:”format a: /vATA

