Commands are a set of instructions given to the computer to perform specific tasks. We can issue commands via a command-line interface, as input to a network service as part of a network protocol, or as an event in a graphical user interface. While there are a variety of commands we can make the computer work with, today we’ll talk about one of the many commands prompts that we’ll use on a Command Line Interface capable of reading or making changes to your computer’s Operating System.
Chkdsk, or the Check Disk command, is a system tool and command that verifies the specific files or disks of your system as a whole. It verifies if the files are corrupted, even change and fix errors with further commands. You can access and perform this command from the Command Line Interface, which functions only with the use of keyboard and through the Graphical User Interface (GUI) that functions with a mouse, on-screen buttons, etc. Before we divert much from the topic, we’ll look more into the Chkdsk command.
Also Read
Syntax of Chkdsk Command
Instructions
| Item | Command Meaning |
| volume: | This is the drive letter of the partition for which you want to check for errors. |
| /f | This chkdsk command option will fix any errors found on the disk. |
| /v | Use this chkdsk option on a FAT or FAT32 volume to show the full directory and name of the entire file disks. If used on an NTFS volume, it will show cleanup messages. |
| /r | This option tells chkdsk to locate bad sectors and recover any readable information from them. |
| /x | This command option implies /f and will force a dismount of the volume if necessary. |
| /i | This option will perform a less vigorous chkdsk command, making the process faster by skipping over certain regular checks. |
| /c | Same as /i but skips over cycles within the folder structure to reduce the amount of time that the chkdsk command runs. |
| /l:size | Use this chkdsk command option to change the size (in KB) of the log file. The default log file size for chkdsk is 65536 KB; you can check the current log file size by executing /l without the “size” option. |
| /perf | This option allows chkdsk to run faster by using more system resources. It has to be used with /scan. |
| /scan | This chkdsk option runs an online scan on an NTFS volume but does not try to repair it. Here, “online” means that the volume does not need to be dismounted, but can instead remain online/active. |
| /spotfix | This chkdsk option dismounts the volume only briefly in order to fix issues that were sent to the log file. |
| /? | Use the help switch with the chkdsk command to show detailed help about the commands listed above and other options you can use with chkdsk. |
Examples
When you open the Command Prompt Interface, a line of directory C:\WINDOWS\system32> will be written there as default. You must not make any changes to it but to perform the command, the items should be added after it.
- C:\WINDOWS\system32>chkdsk – type and enter chkdsk if you only want to check the drivers/disks without repairing any bad sectors or errors.
- C:\WINDOWS\system32>chkdsk C: /f – type and enter chkdsk<space>C:(the name of the disk)<space>/f to check the specific drive as well as fix any errors in it.
- C:\WINDOWS\system32>chkdsk C: /r – type and enter chkdsk<space>C:(the name of the disk)<space>/r to locate bad sectors of the specific disk, fix errors in it and recover any readable information from the same.
- C:\WINDOWS\system32>chkdsk C: /scan /forceofflinefix – type and enter chkdsk<space>C:(the name of the disk)<space>/scan<space>/forceofflinefix to check errors and make it in queue to be resolved later in an offline repair.
- C:\WINDOWS\system32>chkdsk C: /r /scan /perf – type and enter chkdsk<space>C:(the name of the disk)<space>/r<space>/scan<space>/perf to check for errors and fix the specific disk while you’re using it so that it will use up most of the system resources to run and finish the command as quickly as possiblele.
All you have to do is specify which disk you want to perform your command on and copy from the above table the command option that you desire to perform on disks.