> DOS 中文参考手册 > chkdsk

CHKDSK

(check the disk)


检查磁盘状态并显示状态报告。还能修正磁盘错误。

状态报告显示MS-DOS文件系统中的逻辑错误,该文件系统由文件分配表(FAT)和目录组成(CHKDSK不验证文件中的信息能否准确读出)。如果磁盘有错,CHKDSK给出一条警告信息。所以,应不时用用CHKDSK,来检查一下有无磁盘错误。

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]

volume 指定驱动器(后面跟一个冒号)、装入点或卷名。

filename 仅用于 FAT/FAT32: 指定要检查是否有碎片的文件。指定要用CHKDSK进行碎片检查的一个或一组文件的路径及名称。可用通配符(*和?)指定多个文件。

/F 修复磁盘上的错误。

/V 在 FAT/FAT32 上: 显示磁盘上每个文件的完整路径和名称。

在 NTFS 上: 如果有清除消息,将其显示。

/R 查找不正确的扇区并恢复可读信息(隐含 /F)。

/L:size 仅用于 NTFS: 将日志文件大小改成指定的 KB 数。

如果没有指定大小,则显示当前的大小。

/X 如果必要,强制卷先卸下。

卷的所有打开的句柄就会无效(隐含 /F)。

/I 仅用于 NTFS: 对索引项进行强度较小的检查。

/C 仅用于 NTFS: 跳过文件夹结构的循环检查。

/I 和 /C 命令行开关跳过卷的某些检查,减少运行 Chkdsk 所需的时间。

★★★★★实例★★★★★:

若想检查驱动器C上存储多少数据,还有多少剩余空间,并修正磁盘错误,可输入下面命令:

chkdsk c:

当遇到错误时,CHKDSK会暂停并提示信息。

若要重定向CHKDSK的输出到一名为STATUS的文件,可输入命令:

chkdsk a: > status

因为输出被重定向了,MS-DOS不再修正在检查期间遇到的错误,但它将在报告文件中记录下全部错误。然后,再用CHKDSK带/F开关项来修正状态报告中的错误,这时不要重定向。


Checks a disk and displays a status report.

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]

volume Specifies the drive letter (followed by a colon),mount point, or volume name.

filename FAT/FAT32 only: Specifies the files to check for fragmentation

.

/F Fixes errors on the disk.

/V On FAT/FAT32: Displays the full path and name of every file on the disk. On NTFS: Displays cleanup messages if any.

/R Locates bad sectors and recovers readable information (implies /F).

/L:size NTFS only: Changes the log file size to the specified number of kilobytes. If size is not specified, displays current size.

/X Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F).

/I NTFS only: Performs a less vigorous check of index entries.

/C NTFS only: Skips checking of cycles within the folder structure.

The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume.


下一篇: