Fsck − The UNIX File System Check Program Marshall Kirk McKusick Computer Systems Research Group Computer Science Division Department of Electrical Engineering and Computer Science University of California, Berkeley Berkeley, CA 94720 T. J. Kowalski Bell Laboratories Murray Hill, New Jersey 07974 ABSTRACT This document reﬂects the use of fsck with the BSD and BSD ﬁle system organization. This is a revision of the original paper written by T. J. Kow alski. File System Check Program (fsck) is an interactive ﬁle system check and repair program. Fsck uses the redundant structural information in the UNIX ﬁle system to perform several consistency checks. If an inconsistency is detected, it is reported to the operator, who may elect to xor ignore each inconsistency. These inconsistencies result from the permanent interruption of the ﬁle system updates, which are performed every time ale is modiﬁed. Unless there has been a hardware failure, fsck is able to repair corrupted ﬁle systems using procedures based upon the order in which UNIX honors these ﬁle system update requests. The purpose of this document is to describe the normal updating of the ﬁle system, to discuss the possible causes of ﬁle system corruption, and to present the corrective actions implemented by fsck. Both the program and the interaction between the program and the operator are described. Revised October 7, UNIX is a trademark of Bell Laboratories. This work was done under grants from the National Science Foundation under grant MCS80-05144, and the Defense Advance Research Projects Agency (DoD) under Arpa Order No. 4031 monitored by Naval Electronic System Command under Contract No. N00039-82-C-0235.