CHKDSK (Disk Checking)
CHKDSK:
CHKDSK is a command used on computers running DOS, OS/2 and Microsoft Windows operating systems that displays the file system integrity status of hard disks and floppy disk and can fix logical file system errors. It is similar to the fsck command in Unix.
Chkdsk (Chkdsk.exe) is a command-line tool that checks volumes for problems. The tool then tries to repair any that it finds. For example, Chkdsk can repair problems related to bad sectors, lost clusters, cross-linked files, and directory errors. To use Chkdsk, you must log on as an administrator or as a member of the Administrators group.
Syntax
chkdsk [volume:][[Path] FileName] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:size]]
Parameters -
volume: : Specifies the drive letter (followed by a colon), mount point, or volume name.
[Path] FileName : Specifies the location and name of a file or set of files that you want chkdsk to check for fragmentation. You can use wildcard characters (that is, * and ?) to specify multiple files.
/f : Fixes errors on the disk. The disk must be locked. If chkdsk cannot lock the drive, a message appears that asks you if you want to check the drive the next time you restart the computer.
/v : Displays the name of each file in every directory as the disk is checked.
/r : Locates bad sectors and recovers readable information. The disk must be locked.
/x : Use with NTFS only. Forces the volume to dismount first, if necessary. All open handles to the drive are invalidated. /x also includes the functionality of /f.
/i : Use with NTFS only. Performs a less vigorous check of index entries, reducing the amount of time needed to run chkdsk.
/c : Use with NTFS only. Skips the checking of cycles within the folder structure, reducing the amount of time needed to run chkdsk.
/l[:size] : Use with NTFS only. Changes the log file size to the size you type. If you omit the size parameter, /l displays the current size.
/?: Displays help at the command prompt.
Run CHKDSK to check for disk errors
1. Click Start > Run.
2. In the Run box, type the following text: cmd
3. Click OK.
4. At the command prompt, type the drive letter of the drive you want to check (followed by a colon), and then press Enter.
For example, to check drive D, type the following text: d:
5. Change to the root directory of the drive by typing the following text and pressing Enter: cd\
6 .Type the following text, and then press Enter: chkdsk /<switch>
where <switch> is one of the following:
# If you want to automatically repair file system errors, use the /f switch (for example, chkdsk /f).
# If you want to both repair file system errors and scan for and recover bad sectors, use the /r switch (for example, chkdsk /r).
If you do not specify a switch when running CHKDSK, any errors that are found will not be fixed.
7. If you are prompted to schedule CHKDSK to run the next time the computer restarts (because CHKDSk may be unable to gain exclusive access to the drive under Windows), type the following text, and then press Enter: y
8. At the command prompt, type the following text, and then press Enter: exit.
9. If you had to schedule the CHKDSK operation, then restart Windows NT/2000/XP.
While Windows is loading, CHKDSK should automatically run and check the drive that you specified earlier.
Reference:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/chkdsk.mspx?mfr=true
Submitted By : Sonam malhotra
Profile on Facebook : View profile