📄 dosfsck.8
字号:
.TH DOSFSCK 8 "December 31 1997" "Linux" "MAINTENANCE COMMANDS".SH NAMEdosfsck \- check and repair MS-DOS file systems.SH SYNOPSIS.ad l.B dosfsck.RB [ \-aAflnrtvVwy ].RB [ \-d\ \fIpath\fB\ \-d\ \fI...\fB ].RB [ \-u\ \fIpath\fB\ \-u\ \fI...\fB ].I device.ad b.SH DESCRIPTION.B dosfsckverifies the consistency of MS-DOS file systems and optionally tries torepair them. The following file system problems can be corrected (in thisorder):.IP \-FAT contains invalid cluster numbers. Cluster is changed to EOF..PD 0.IP \-File's cluster chain contains a loop. The loop is broken..IP \-Bad clusters (read errors). The clusters are marked bad and they areremoved from files owning them. This check is optional..IP \-Directories with a large number of bad entries (probably corrupt). Thedirectory can be dropped..IP \-Files . and .. are non-directories. They can be dropped or renamed..IP \-Directories . and .. in root directory. They are dropped..IP \-Bad file names. They can be renamed..IP \-Duplicate directory entries. They can be dropped or renamed..IP \-Directories with non-zero size field. Size is set to zero..IP \-Directory . does not point to parent directory. The start pointer isadjusted..IP \-Directory .. does not point to parent of parent directory. The start pointeris adjusted..IP \-Start cluster number of a file is invalid. The file is truncated..IP \-File contains bad or free clusters. The file is truncated..IP \-File's cluster chain is longer than indicated by the size fields. The fileis truncated..IP \-Two or more files share the same cluster(s). All but one of the files aretruncated. If the file being truncated is a directory file that has alreadybeen read, the file system check is restarted after truncation..IP \-File's cluster chain is shorter than indicated by the size fields. The fileis truncated..IP \-Clusters are marked as used but are not owned by a file. They are markedas free..PD.LPAdditionally, the following problems are detected, but not repaired:.IP \-Invalid parameters in boot sector..PD 0.IP \-Absence of . and .. entries in non-root directories.PD.LPWhen \fBdosfsck\fP checks a file system, it accumulates all changes in memoryand performs them only after all checks are complete. This can be disabledwith the \fB\-w\fP option..SH OPTIONS.IP \fB\-a\fPAutomatically repair the file system. No user intervention is necessary.Whenever there is more than one method to solve a problem, the leastdestructive approach is used..IP \fB\-A\fPUse Atari variation of the MS-DOS filesystem. This is default if\fBdosfsck\fP is run on an Atari, then this option turns off Atariformat. There are some minor differences in Atari format: Some bootsector fields are interpreted slightly different, and the special FATentries for end-of-file and bad cluster can be different. UnderMS-DOS 0xfff8 is used for EOF and Atari employs 0xffff by default, butboth systems recognize all values from 0xfff8...0xffff as end-of-file.MS-DOS uses only 0xfff7 for bad clusters, where on Atari values0xfff0...0xfff7 are for this purpose (but the standard value is still0xfff7)..IP \fB\-d\fPDrop the specified file. If more that one file with that name exists, thefirst one is dropped..IP \fB\-f\fPSalvage unused cluster chains to files. By default, unused clusters areadded to the free disk space except in auto mode (\fB-a\fP)..IP \fB\-l\fPList path names of files being processed..IP \fB\-n\fPNo-operation mode: non-interactively check for errors, but don't writeanything to the filesystem. .IP \fB\-r\fPInteractively repair the file system. The user is asked for advice wheneverthere is more than one approach to fix an inconsistency..IP \fB\-t\fPMark unreadable clusters as bad..IP \fB-u\fPTry to undelete the specified file. \fBdosfsck\fP tries to allocate a chainof contiguous unallocated clusters beginning with the start cluster of theundeleted file..IP \fB\-v\fPVerbose mode. Generates slightly more output..IP \fB\-V\fPPerform a verification pass. The file system check is repeated after thefirst run. The second pass should never report any fixable errors. It maytake considerably longer than the first pass, because the first pass mayhave generated long list of modifications that have to be scanned for eachdisk read..IP \fB\-w\fPWrite changes to disk immediately..IP \fB\-y\fPSame as \fB\-a\fP (automatically repair filesystem) for compatibilitywith other fsck tools..LPIf \fB\-a\fP and \fB\-r\fP are absent, the file system is only checked,but not repaired..SH "EXIT STATUS".IP 0No recoverable errors have been detected..IP 1Recoverable errors have been detected or \fBdosfsck\fP has discovered aninternal inconsistency..IP 2Usage error. \fBdosfsck\fP did not access the file system..SH BUGSDoes not create . and .. files where necessary. Does not remove entirelyempty directories. Should give more diagnostic messages. Undeleting filesshould use a more sophisticated algorithm..\".SH "SEE ALSO".\"fs(5).SH AUTHORSWerner Almesberger <werner.almesberger@lrc.di.epfl.ch>Extensions (FAT32, VFAT) by and current maintainer:Roman Hodek <roman@hodek.net>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -