chkdsk Command with Examples {5 Examples} (2024)

Introduction

The chkdsk command (short for "Check Disk") is a Windows utility that scans disks and reports on the state of the partitions and the stored data. Use chkdsk to repair drives and recover data from the damaged drive sectors.

This tutorial shows you how to use chkdsk to detect errors and repair your Windows drives.

chkdsk Command with Examples {5 Examples} (1)

Prerequisites

  • Windows machine.
  • User account with admin privileges.
  • Access to Command Prompt or PowerShell.

Note: For the command that performs a similar function in Linux, refer to How to Use fsck Command.

chkdsk Syntax

The chkdsk command can take one or more arguments. The basic chkdsk command syntax is:

chkdsk [volume] [switches]

Volumes and switches are optional. Enter the base command to start the scan:

chkdsk

When you ran chkdsk on its own, it scans the drives in read-only mode.

chkdsk Command with Examples {5 Examples} (2)

However, running chkdsk without the /F parameter on an active partition may produce false positives, so this method of partition scanning is not recommended.

chkdsk Options

Expand and customize the chkdsk functionality by providing additional command-line arguments. The table below contains the list of the available options.

Note: The table mentions online and offline scanning. In the chkdsk context, an online scan is performed while the volume is still mounted. An offline scan dismounts the volume to fix errors.

ArgumentDescription
[volume]Specify a volume for chkdsk to scan. Follow the volume letter with the : symbol (e.g., C:).
/BClear the list of bad clusters, re-scan the drive for errors, and recover readable information. Use this switch only with NTFS partitions.
/CSpeed up the scanning process by skipping over folder structure cycles. Use the switch with NTFS partitions only.
/FFix errors on the disk.
/forceofflinefixPrevent online repair and force offline repair of all errors. Use the switch only with NTFS partitions alongside the /scan option.
/ISkip routine indexing checks and perform a fast drive scan. Use the switch with NTFS partitions only.
/L:[size]Change the log file size. If you do not state the size, /L prints the current file size. Use the switch with NTFS partitions only.
/offlinescanandfixScan and fix the volume offline.
/perfSpeed up the scan by using more system resources. Use the switch only with NTFS partitions alongside the /scan option.
/RScan for bad sectors and recover non-corrupted information. If the /scan option is not included, chkdsk also attempts to fix the disk errors.
/scanRun an online scan. Use this switch with NTFS partitions only.
/spotfixImmediately fix the errors. Use the switch with NTFS partitions only.
/VOn FAT and FAT32 partitions, the option shows the paths of all the files on the disk. On NTFS partitions, it shows cleanup messages.
/XForce-dismount the drive and fix any errors on the disk.
/?Show chdsk help.

How to Run chkdsk

chkdsk is a command-line interface (CLI) tool available in Windows Command Prompt and Windows PowerShell. The following steps show how to access the CLI with the administrative privileges to run the command.

1. Click Start.

2. Type PowerShell. The Windows PowerShell item appears in the list of programs.

Note: To use chkdsk in the Command Prompt, search for Command Prompt instead of PowerShell.

3. Select Run as Administrator in the pane on the right side.

chkdsk Command with Examples {5 Examples} (3)

The PowerShell window opens.

chkdsk Command with Examples {5 Examples} (4)

chkdsk Examples

Combining the available switches with the chkdsk command helps narrow the scan target and perform custom scans. The following are examples of using the chkdsk command.

  • Scan the C drive for bad sectors and recover the readable information:
chkdsk C: /R

If chkdsk cannot lock the drive, it displays the following message.

chkdsk Command with Examples {5 Examples} (5)

Type Y and press Enter. Then restart the computer to complete the scan.

  • Run an online scan of the NTFS-formatted C partition but force chkdsk to perform all the fixes offline:
chkdsk C: /scan /forceofflinefix

The output show the scan stages.

chkdsk Command with Examples {5 Examples} (6)

If the scan finds any errors, they are repaired after the drive is dismounted. If there are no errors, chkdsk displays a report.

chkdsk Command with Examples {5 Examples} (7)
  • Scan and fix drive D bad sectors online, using the maximum allowed amount of system resources.
chkdsk D: /R /scan /perf
  • Scan for disk errors on drive D and force the drive to dismount if necessary.
chkdsk D: /X 
  • Perform an online scan of drive C for bad sectors, ignoring the previous bad sector records.
chkdsk C: /B /scan

Conclusion

This tutorial presented the chkdsk command, a Windows CLI utility for scanning and repairing disks. After reading it, you should know how to scan and recover bad sectors and fix disk errors on your Windows system.

Learn more about data corruption by reading What is Data Corruption and Can You Prevent it?

chkdsk Command with Examples {5 Examples} (2024)
Top Articles
List of Finance Ministers Who Presented the Most Budgets
Repairs to do before selling a house in California
Dannys U Pull - Self-Service Automotive Recycling
Thor Majestic 23A Floor Plan
Metra Union Pacific West Schedule
Fully Enclosed IP20 Interface Modules To Ensure Safety In Industrial Environment
Rondale Moore Or Gabe Davis
라이키 유출
Www Craigslist Louisville
Crazybowie_15 tit*
Jesus Revolution Showtimes Near Chisholm Trail 8
Detroit Lions 50 50
Mephisto Summoners War
Void Touched Curio
978-0137606801
Committees Of Correspondence | Encyclopedia.com
Canvas Nthurston
Wicked Local Plymouth Police Log 2022
Equibase | International Results
Bing Chilling Words Romanized
St. Petersburg, FL - Bombay. Meet Malia a Pet for Adoption - AdoptaPet.com
Dover Nh Power Outage
St Clair County Mi Mugshots
2021 Volleyball Roster
Greenville Sc Greyhound
Bellin Patient Portal
Everything To Know About N Scale Model Trains - My Hobby Models
Ocala Craigslist Com
Jackass Golf Cart Gif
Skepticalpickle Leak
Robert A McDougal: XPP Tutorial
Leland Nc Craigslist
Petsmart Distribution Center Jobs
Netherforged Lavaproof Boots
Chs.mywork
Viewfinder Mangabuddy
Dynavax Technologies Corp (DVAX)
Hell's Kitchen Valley Center Photos Menu
How To Get Soul Reaper Knife In Critical Legends
Dollar Tree's 1,000 store closure tells the perils of poor acquisitions
Nina Flowers
Smite Builds Season 9
3 bis 4 Saison-Schlafsack - hier online kaufen bei Outwell
The Horn Of Plenty Figgerits
Port Huron Newspaper
Nearest Wintrust Bank
Joy Taylor Nip Slip
Anonib New
Craigslist Pet Phoenix
Pulpo Yonke Houston Tx
Used Curio Cabinets For Sale Near Me
Latest Posts
Article information

Author: Francesca Jacobs Ret

Last Updated:

Views: 5747

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Francesca Jacobs Ret

Birthday: 1996-12-09

Address: Apt. 141 1406 Mitch Summit, New Teganshire, UT 82655-0699

Phone: +2296092334654

Job: Technology Architect

Hobby: Snowboarding, Scouting, Foreign language learning, Dowsing, Baton twirling, Sculpting, Cabaret

Introduction: My name is Francesca Jacobs Ret, I am a innocent, super, beautiful, charming, lucky, gentle, clever person who loves writing and wants to share my knowledge and understanding with you.