Open In App

dosfsck command in Linux with Examples

dosfsck stands for DOS File System Consistency Check. It is a component of dosfstools package in the Unix-like operating systems. In order to use dosfsck dosfstools package needs to be installed. dosfsck command diagnose MS-DOS file system for problems and attempts to repair them. Always unmount the file system before running dosfsck to avoid any courruption issues.

Syntax:



dosfsck [-aAflrtvVwy] [-d path -d ...] [-u path -u ...]  device

dosfsck command can be used to for correcting some below mentioned problems:

These filesystem problems can also be detected but are not fixed by dosfsck command if:



Options:

Exit Codes for dosfsck:

0 : No recoverable errors were detected.
1 : Recoverable errors or internal inconsistency was detected.
2 : Usage or Syntax error.

Examples:

Article Tags :