]>
Commit | Line | Data |
---|---|---|
1 | .\" -*- nroff -*- | |
2 | .TH FSCK 8 "Jul 1993" "Version 1.8" | |
3 | .SH NAME | |
4 | fsck \- check and repair a Linux file system | |
5 | .SH SYNOPSIS | |
6 | .B fsck | |
7 | [ | |
8 | .B \-A | |
9 | ] | |
10 | [ | |
11 | .B \-V | |
12 | ] | |
13 | [ | |
14 | .B \-t | |
15 | .I fstype | |
16 | ] | |
17 | [ | |
18 | .B fs-options | |
19 | ] | |
20 | .I filesys | |
21 | .SH DESCRIPTION | |
22 | .B fsck | |
23 | is used to check and optionally repair a Linux file system. | |
24 | .I filesys | |
25 | is either the device name (e.g. /dev/hda1, /dev/sdb2) or | |
26 | the mount point (e.g. /, /usr, /home) for the file system. | |
27 | .PP | |
28 | The exit code returned by | |
29 | .B fsck | |
30 | is the sum of the following conditions: | |
31 | .br | |
32 | \ 0\ \-\ No errors | |
33 | .br | |
34 | \ 1\ \-\ File system errors corrected | |
35 | .br | |
36 | \ 2\ \-\ File system errors corrected, system should | |
37 | .br | |
38 | \ \ \ \ be rebooted if file system was mounted | |
39 | .br | |
40 | \ 4\ \-\ File system errors left uncorrected | |
41 | .br | |
42 | \ 8\ \-\ Operational error | |
43 | .br | |
44 | \ 16\ \-\ Usage or syntax error | |
45 | .br | |
46 | \ 128\ \-\ Shared library error | |
47 | .br | |
48 | The exit code returned when all file systems are checked using the | |
49 | .B -A | |
50 | option is the bit-wise OR of the exit codes for each | |
51 | file system that is checked. | |
52 | .PP | |
53 | In actuality, | |
54 | .B fsck | |
55 | is simply a front-end for the various file system checkers | |
56 | (\fBfsck\fR.\fIfstype\fR) | |
57 | available under Linux. | |
58 | The file system-specific checker is searched for in /etc/fs first, | |
59 | then in /etc and finally in the directories listed in the PATH | |
60 | environment variable. | |
61 | Please see the file system-specific checker manual pages for | |
62 | further details. | |
63 | .SH OPTIONS | |
64 | .TP | |
65 | .B -A | |
66 | Walk through the | |
67 | .I /etc/fstab | |
68 | file and try to check all file systems in one run. This option is | |
69 | typically used from the | |
70 | .I /etc/rc | |
71 | system initalization file, instead of multiple commands for checking | |
72 | a single file system. Note, that with this option, you cannot give | |
73 | the | |
74 | .I filesys | |
75 | argument as well. | |
76 | .TP | |
77 | .B -V | |
78 | Produce verbose output, including all file system-specific commands | |
79 | that are executed. | |
80 | Specifying this option more than once inhibits execution of any | |
81 | file system-specific commands. | |
82 | This is really only useful for testing. | |
83 | .TP | |
84 | .BI -t \ fstype | |
85 | Specifies the type of file system to be checked. | |
86 | If not specified, the type is deduced by searching for | |
87 | .I filesys | |
88 | in | |
89 | .I /etc/fstab | |
90 | and using the corresponding entry. | |
91 | If the type can not be deduced, the default file system type | |
92 | (currently minix) is used. | |
93 | .TP | |
94 | .B fs-options | |
95 | File system-specific options to be passed to the real file | |
96 | system checker. | |
97 | Although not guaranteed, the following options are supported | |
98 | by most file system checkers. | |
99 | .TP | |
100 | .I -a | |
101 | Automatically repair the file system without any questions (use | |
102 | this option with caution). | |
103 | .TP | |
104 | .I -l | |
105 | List all the file names in the file system. | |
106 | .TP | |
107 | .I -r | |
108 | Interactively repair the file system (ask for confirmations). | |
109 | .TP | |
110 | .I -s | |
111 | List the super block before checking the file system. | |
112 | .TP | |
113 | .I -v | |
114 | Produce verbose output. | |
115 | .SH BUGS | |
116 | All generic options must precede and not be combined with | |
117 | file system-specific options. | |
118 | Some file system-specific programs do not support the | |
119 | .I -v | |
120 | (verbose) option, nor return meaningful exit codes. | |
121 | .SH AUTHORS | |
122 | David Engel (david@ods.com) | |
123 | .br | |
124 | Fred N. van Kempen (waltje@uwalt.nl.mugnet.org) | |
125 | .br | |
126 | The manual page was shamelessly adapted from Remy Card's version | |
127 | for the ext2 file system. | |
128 | .SH SEE ALSO | |
129 | .BR mkfs (8), | |
130 | .BR fsck.minix (8), | |
131 | .BR fsck.ext (8), | |
132 | .BR fsck.ext2 (8), | |
133 | .BR fsck.xiafs (8). |