1 .TH DOSFSCK 8 "December 31 1997" "Linux" "MAINTENANCE COMMANDS"
3 dosfsck \- check and repair MS-DOS file systems
8 .RB [ \-d\ \fIpath\fB\ \-d\ \fI...\fB ]
9 .RB [ \-u\ \fIpath\fB\ \-u\ \fI...\fB ]
14 verifies the consistency of MS-DOS file systems and optionally tries to
15 repair them. The following file system problems can be corrected (in this
18 FAT contains invalid cluster numbers. Cluster is changed to EOF.
21 File's cluster chain contains a loop. The loop is broken.
23 Bad clusters (read errors). The clusters are marked bad and they are
24 removed from files owning them. This check is optional.
26 Directories with a large number of bad entries (probably corrupt). The
27 directory can be dropped.
29 Files . and .. are non-directories. They can be dropped or renamed.
31 Directories . and .. in root directory. They are dropped.
33 Bad file names. They can be renamed.
35 Duplicate directory entries. They can be dropped or renamed.
37 Directories with non-zero size field. Size is set to zero.
39 Directory . does not point to parent directory. The start pointer is
42 Directory .. does not point to parent of parent directory. The start pointer
45 Start cluster number of a file is invalid. The file is truncated.
47 File contains bad or free clusters. The file is truncated.
49 File's cluster chain is longer than indicated by the size fields. The file
52 Two or more files share the same cluster(s). All but one of the files are
53 truncated. If the file being truncated is a directory file that has already
54 been read, the file system check is restarted after truncation.
56 File's cluster chain is shorter than indicated by the size fields. The file
59 Clusters are marked as used but are not owned by a file. They are marked
63 Additionally, the following problems are detected, but not repaired:
65 Invalid parameters in boot sector.
68 Absence of . and .. entries in non-root directories
71 When \fBdosfsck\fP checks a file system, it accumulates all changes in memory
72 and performs them only after all checks are complete. This can be disabled
73 with the \fB\-w\fP option.
76 Automatically repair the file system. No user intervention is necessary.
77 Whenever there is more than one method to solve a problem, the least
78 destructive approach is used.
80 Use Atari variation of the MS-DOS filesystem. This is default if
81 \fBdosfsck\fP is run on an Atari, then this option turns off Atari
82 format. There are some minor differences in Atari format: Some boot
83 sector fields are interpreted slightly different, and the special FAT
84 entries for end-of-file and bad cluster can be different. Under
85 MS-DOS 0xfff8 is used for EOF and Atari employs 0xffff by default, but
86 both systems recognize all values from 0xfff8...0xffff as end-of-file.
87 MS-DOS uses only 0xfff7 for bad clusters, where on Atari values
88 0xfff0...0xfff7 are for this purpose (but the standard value is still
91 Drop the specified file. If more that one file with that name exists, the
94 Salvage unused cluster chains to files. By default, unused clusters are
95 added to the free disk space except in auto mode (\fB-a\fP).
97 List path names of files being processed.
99 No-operation mode: non-interactively check for errors, but don't write
100 anything to the filesystem.
102 Interactively repair the file system. The user is asked for advice whenever
103 there is more than one approach to fix an inconsistency.
105 Mark unreadable clusters as bad.
107 Try to undelete the specified file. \fBdosfsck\fP tries to allocate a chain
108 of contiguous unallocated clusters beginning with the start cluster of the
111 Verbose mode. Generates slightly more output.
113 Perform a verification pass. The file system check is repeated after the
114 first run. The second pass should never report any fixable errors. It may
115 take considerably longer than the first pass, because the first pass may
116 have generated long list of modifications that have to be scanned for each
119 Write changes to disk immediately.
121 Same as \fB\-a\fP (automatically repair filesystem) for compatibility
122 with other fsck tools.
124 If \fB\-a\fP and \fB\-r\fP are absent, the file system is only checked,
128 No recoverable errors have been detected.
130 Recoverable errors have been detected or \fBdosfsck\fP has discovered an
131 internal inconsistency.
133 Usage error. \fBdosfsck\fP did not access the file system.
135 Does not create . and .. files where necessary. Does not remove entirely
136 empty directories. Should give more diagnostic messages. Undeleting files
137 should use a more sophisticated algorithm.
141 Werner Almesberger <werner.almesberger@lrc.di.epfl.ch>
142 Extensions (FAT32, VFAT) by and current maintainer:
143 Roman Hodek <roman@hodek.net>