Check Disk or
chkdsk command is used to detect FAT16, FAT32, NTFS file system related errors and fix them. Chkdsk can not recover corrupted files which is hard situation. Chkdsk can be run from command line or from GUI but the command line use is the most practical way.
Syntax of chkdsk is very simple.
chkdsk OPTIONS VOLUME
Schedule Check Disk At System Start
One of the most popular use case for
chkdsk is scheduling a check at the system startup or restart. Because we can not check system volume which is generally
C: at run time. Before mounting the volume the check operation is done.
> chkdsk /F C:
Fix Errors On Disk
File systems used to store files and folders , user data in a appropriate way. file systems have very complex structure related with their features. Shutdown down a system an unexpected way Halting system, disk related issues may create errors in file systems. We can simply use
/F option with the volume name which is
D: in this example.
> chkdsk /F D:
Locate Bad Sector
Disk drives store data in sectors. Each sector holds some data according its size configuration. Disk drives can lose some of theirs sectors in time. This is a physical damage so it can not be fixed in a physical way. We can locate and label these sectors as bad sectors and prevent them to be used by file system. We can do this with
/R option. In this example we check bad sectors of volume
> chkdsk /R D:
Force Unmount Of Volume
While doing disk related operations we need to unmount the volume in order to prevent unexpected errors. Checking mounted volumes and file systems will create conflicts. We can unmount the filesystem and volume before operation with
> chkdsk /X D:
Checking of file system and disk errors may take some time. By default chkdsk uses very detailed check procedures. But some of them are not necessary in most cases. We can prevent to use unneeded checks to make check faster. We will use
/I /C for checking in a fast way.
> chkdsk /I /C D:
Verbose mode provides more detailed information about current operation. We can get details with
> chkdsk /V D: