Linux "fsck.msdos" Command Line Options and Examples
check and repair MS-DOS filesystems

fsck.fat verifies the consistency of MS-DOS filesystems and optionally tries to repair them. The following filesystem problems can be corrected (in this order): * FAT contains invalid cluster numbers.


Usage:

fsck.fat [OPTIONS] DEVICE






Command Line Options:

-b
Make read-only boot sector check.
fsck.msdos -b ...
-c
Use DOS codepage PAGE to decode short file names. By default codepage 437 is used.
fsck.msdos -c ...
-d
Delete the specified file. If more than one file with that name exist, the first one is deleted. This option can be given morethan once.
fsck.msdos -d ...
-f
Salvage unused cluster chains to files. By default, unused clusters are added to the free disk space except in auto mode (-a).
fsck.msdos -f ...
-l
List path names of files being processed.
fsck.msdos -l ...
-n
No-operation mode: non-interactively check for errors, but don't write anything to the filesystem.
fsck.msdos -n ...
-p
for compatibility with other *fsck.
fsck.msdos -p ...
-t
Mark unreadable clusters as bad.
fsck.msdos -t ...
-u
Try to undelete the specified file. fsck.fat tries to allocate a chain of contiguous unallocated clusters beginning with thestart cluster of the undeleted file. This option can be given more than once.
fsck.msdos -u ...
-v
Verbose mode. Generates slightly more output.
fsck.msdos -v ...
-w
Write changes to disk immediately.
fsck.msdos -w ...
-y
EXIT STATUS0 No recoverable errors have been detected.1 Recoverable errors have been detected or fsck.fat has discovered an internal inconsistency.2 Usage error. fsck.fat did not access the filesystem.FILESfsck0000.rec, fsck0001.rec, ...When recovering from a corrupted filesystem, fsck.fat dumps recovered data into files named 'fsckNNNN.rec' in the top leveldirectory of the filesystem.BUGSDoes not create . and .. files where necessary. Does not remove entirely empty directories. Should give more diagnostic messages.Undeleting files should use a more sophisticated algorithm.
fsck.msdos -y ...