MS-DOS Commands :: chkdsk
Warning: This command is for advanced users only!
Checks a volume (a hard drive or disk) for logically errors and displays a status report. If instructed to do so, chkdsk will fix logical errors. Can also be instructed to locate physical errors ("bad sectors") and attempt to recover readable information.
Depending upon the size of the volume and the number of files on the volume, the chkdsk command can take take several minutes to 2 hours or more to finish. If the command is run in
read-onlymode (the default), you can continue working in Windows but no errors will be fixed.
To stop chkdsk before it finishes, press
Tip: Since chkdsk may take a long time to finish, run it (with the /f flag) overnight rather than waiting for it to finish.
Tip: See: How to perform disk error checking in Windows XP (KB315265)
As the check progresses, status information is dispalyed, such as:The type of the file system is NTFS. Volume label is S1A2345D678. WARNING! F parameter not specified. Running CHKDSK in read-only mode. CHKDSK is verfying files (stage 1 of 3)... File verification completed. CHKDSK is verifying indexes (step 2 of 3)... Index verification completed. CHKDSK is verifying security descriptors (stage 3 of 3)... Security descriptor verification completed. Windows found problems with the file system. Run CHKDSK with the /F (fix) option to correct these.
Performs a read-only check of the current drive or the specified drive: drive. If any errors are found, they are merely displayed on the output; they are not fixed (contrary to what some error messages may indicate, e.g.: "Deleting an index entry from index $0 of file 25.").
Note: In read-only mode, chkdsk is prone to reporting false positive errors (e.g.: "Correcting errors in the Volume Bitmap") when, in fact, there may not be any real errors. This known issue happens because the state of the volume is changing while the check is being performed. Run chkdsk with the /f or /r flag.
chkdsk drive: /f
Performs a check of the specified drive and fixs any logcal errors that are found. Does not attempt to locate physical errors ("bad sectors"). If the drive is in use (e.g.: because you're using Windows), chkdsk will display the following prompt:
Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N)
In that case, reply with Y and press Enter. Restart your computer. chkdsk will be run during system startup. Note: It may take considerable time for chkdsk to finish.
chkdsk drive: /r
Similar to the
chkdsk /fvariation shown above. In addition, checks for physical errors ("bad sectors") and attempts to recover readable information.
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.
(Enlarge: help chkdsk)