fsutil dirty

查询或设置卷的脏位。 When a volume's dirty bit is set, autochk automatically checks the volume for errors the next time the computer is restarted.

Syntax

fsutil dirty {query | set} <volumepath>

Parameters

Parameter Description
查询 查询指定卷的脏位。
set 设置指定卷的脏位。
<volumepath> 指定后跟冒号或 GUID 的驱动器名称,格式如下:volume{GUID}

Remarks

  • 卷的脏位指示文件系统可能处于不一致状态。 可以出于以下原因而设置脏位:

    • 卷处于联机状态,并且具有未完成的更改。

    • 已经对卷进行了更改,在将更改提交到磁盘之前,计算机关闭。

    • 在卷上检测到损坏。

  • If the dirty bit is set when the computer restarts, chkdsk runs to verify the file system integrity and to attempt to fix any issues with the volume.

Examples

要查询驱动器 C 上的脏位,请键入:

fsutil dirty query c:
  • 如果卷是脏的,将显示以下输出:Volume C: is dirty

  • 如果卷不是脏的,则显示以下输出:Volume C: is not dirty

要在驱动器 C 上设置脏位,请键入:

fsutil dirty set C: