List of chkdsk Commands in windows

In windows if your windows computer is facing problems and you want to run chkdsk command in windows to resolve the issue with the drives and fix the issues by running necessary scans running through command promnt by using chkdsk command and its very useful to fix and scan the drives and check the file systems metadata of  volume for logical and physical errors and chkdsk will display the status of the volume and by running chkdsk with /f, /r, /b and /x parameters it will fix errors here your can found more information.

List of chkdsk commands in windows:

Below is the list of parameters to run with chkdsk and each parameter is used for particular purpose and does different scans

ParameterDescription
/f Fixes errors on the disk. The disk must be locked.
/v Displays the name of each file in every directory.
/r Locates bad sectors and recovers readable information.
/xIt will force the volume to dismount first, if necessary. All open handles to the drive are invalidated. /x also includes the functionality of /f.
/iPerforms a less vigorous check of index entries, which reduces the amount of time required to run chkdsk.
Note: Use with NTFS only.

/cDoes not check cycles within the folder structure, which reduces the amount of time required to run chkdsk.
Note: Use with NTFS only.
/l[:<Size>] Changes the log file size to the size you type. If you omit the size parameter, /l displays the current size.
/bClears the list of bad clusters on the volume and rescans all allocated and free clusters for errors and it also includes the functionality of /r.
/scanRuns an online scan on the volume.
/forceofflinefix (Must be used with “/scan”). Bypass all online repair; all defects found are queued for offline repair (i.e. “chkdsk /spotfix”).
/perf (Must be used with “/scan”). Uses more system resources to complete a scan as fast aspossible. This may have a negative performance impact on other tasks running on the system.
/spotfix Runs spot fixing on the volume.
/sdcleanup Garbage collect unneeded security descriptor data (implies /F).
/offlinescanandfix Runs an offline scan and fix on the volume.
/freeorphanedchains FAT/FAT32/exFAT only: Frees any orphaned cluster chains instead of recovering their contents.
/markclean FAT/FAT32/exFAT only: Marks the volume clean if no corruption was detected, even if /F was not specified.
/? Displays help at the command prompt.

Syntax of CHKDSK command in windows

chkdsk [<Volume>[[<Path>]<FileName>]] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:<Size>]] [/b]  

Exit codes of chkdsk commands in windows prompt

There are different type of exit codes of chkdsk when you run it in windows command prompt and lets understand them better and clear now below:

Error codesDescription
0No errors were found
1Errors were found and fixed
2 Performed disk cleanup (such as garbage collection) or did not perform cleanup because /f was not specified.
3 Could not check the disk, errors could not be fixed, or errors were not fixed because /f was not specified.

Examples of CHKDSK command in Windows:

If you are using a chkdsk command and use it in windows command prompt to get rid of errors and to run chkdsk in windows command prompt without errors, lets see and example here.

If you want run chkdsk on drive E and fix errors by running chkdsk with paramters like /f, /scan etc, below is the format:

chkdsk E: /f 

Note: you cannot open a file from the particular drive untill and unless scan finishes.

Scan all files with CHKDSK command in windows

If you want to scan all files then you need to type like below in windows command prompt as syntax

chkdsk *.*

List of Command line syntax in windows

Notation Description
Text without brackets or braces Items you must type as shown
[Text inside square brackets] Optional items
<Text inside angle brackets> Placeholder for which you must supply a value
{Text inside braces} Set of required items; choose one
Vertical bar (|)Separator for mutually exclusive items; choose one
Ellipsis (…) Items that can be repeated
What are the chkdsk commands?

Chkdsk commands performs scans on hard drives and it displays only information by adding additional parameters to chkdsk /f it will fix drive errors as well.

How do I run chkdsk?

Open command prompt and run chkdsk and press enter

Which chkdsk command fix errors

Running chkdsk wiht parameters /f, /r, /b and /x parameters it will fix errors.

Ramana
Ramanahttps://www.asavvyweb.com
Ramana Tula is a Google Product Expert - He is a Full stack Web and Android Developer also - SEO Manager and also manages Digital Marketing.

- Advertisement -