Chkdsk 基于所用的文件系统,创建和显示磁盘的状态报告

2019-09-19 07:03:07王振洲


修复磁盘错误 
只有指定 /f 命令行选项,chkdsk 命令才修复磁盘错误。Chkdsk 必须可以锁定驱动器以纠正错误。由于修复通常会更改磁盘的文件分配表,有时还会丢失数据,所以 chkdsk 会首先发送如下所示的确认消息:

10 lost allocation units found in 3 chains.

Convert lost chains to files?

如果按 Y,Windows 会在根目录中将所有丢失链保存在一个名为 Filennnn.chk 的文件中。chkdsk 结束后,可以查看这些文件是否包含了所需的数据。如果按 N,Windows 会修复磁盘,但对于丢失的分配单元,它不保存其内容。

如果不使用 /f 命令行选项,则在有文件需要修复时,chkdsk 会发送消息,但它不修复任何错误。

如果在大磁盘(例如,70 GB)或有大量文件(数百万)的磁盘上使用 chkdsk /f,这可能要花很长时间(比如说,数天)才能完成。因为 chkdsk 直到工作完成它才会交出控制权,所以计算机在这段时间内将不可用。

检查 FAT 磁盘 
Windows 以下列格式显示 FAT 磁盘的 chkdsk 状态报告:

Volume Serial Number is B1AF-AFBF

72214528 bytes total disk space

73728 bytes in 3 hidden files

30720 bytes in 12 directories

11493376 bytes in 386 user files

61440 bytes in bad sectors

60555264 bytes available on disk

2048 bytes in each allocation unit

35261 total allocation units on disk

29568 available allocation units on disk 

检查 NTFS 磁盘 
Windows 以下列格式显示 NTFS 磁盘的 chkdsk 状态报告:

The type of the file system is NTFS.

CHKDSK is verifying files...

File verification completed.

CHKDSK is verifying indexes...

Index verification completed.

CHKDSK is verifying security descriptors...

Security descriptor verification completed.

12372 kilobytes total disk space.

3 kilobytes in 1 user files.

2 kilobytes in 1 indexes.

4217 kilobytes in use by the system.

8150 kilobytes available on disk.

512 bytes in each allocation unit.

24745 total allocation units on disk.

16301 allocation units available on disk.
相关文章 大家在看