1.\" $NetBSD: fsck.8,v 1.19 1999/03/10 00:08:33 erh Exp $ 2.\" $FreeBSD$ 3.\" 4.\" Copyright (c) 1996 Christos Zoulas. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by Christos Zoulas. 17.\" 4. The name of the author may not be used to endorse or promote products 18.\" derived from this software without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30.\" 31.Dd September 23, 1996 32.Dt FSCK 8 33.Os NetBSD 1 34.Sh NAME 35.Nm fsck 36.Nd file system consistency check and interactive repair 37.Sh SYNOPSIS 38.Nm 39.Op Fl dvplfyn 40.Op Fl l Ar maxparallel 41.Op Fl t Ar fstype 42.Op Fl T Ar fstype:fsoptions 43.Op Ar special | node ... 44.Sh DESCRIPTION 45The 46.Nm 47command invokes filesystem-specific programs to check 48the special devices listed in the 49.Xr fstab 5 50file or in the command line for consistency. 51.Pp 52It is normally used in the script 53.Pa /etc/rc 54during automatic reboot. 55If no filesystems are specified, and ``preen'' mode is enabled ( 56.Fl p 57option) 58.Nm 59reads the table 60.Pa /etc/fstab 61to determine which filesystems to check. 62Only partitions in fstab that are mounted ``rw,'' ``rq'' or ``ro'' 63and that have non-zero pass number are checked. 64Filesystems with pass number 1 (normally just the root filesystem) 65are checked one at a time. 66When pass 1 completes, all remaining filesystems are checked, 67running one process per disk drive. 68The disk drive containing each filesystem is inferred from the longest prefix 69of the device name that ends in a digit; the remaining characters are assumed 70to be the partition designator. 71.Pp 72The options are as follows: 73.Bl -tag -width indent 74.It Fl d 75Debugging mode. Just print the commands without executing them. Available 76only if 77.Nm 78is compiled to support it. 79.It Fl f 80Force checking of filesystems, even when they are marked clean (for filesystems 81that support this). 82.It Fl l Ar maxparallel 83Limit the number of parallel checks to the number specified in 84the following argument. By default, the limit is the number of 85disks, running one process per disk. If a smaller limit is giv- 86en, the disks are checked round-robin, one filesystem at a time. 87.It Fl n 88Causes 89.Nm 90to assume no as the answer to all operator questions, except "CONTINUE?". 91.It Fl p 92Enter preen mode. 93.It Fl t Ar fstype 94Invoke 95.Nm 96only for the comma separated list of filesystem types. If the 97list starts with 98.Dq no 99then invoke 100.Nm 101for the filesystem types that are not specified in the list. 102.It Fl v 103Print the commands before executing them. 104.It Fl y 105Causes 106.Nm 107to assume yes 108as the answer to all operator questions. 109.It Fl T Ar fstype:fsoptions 110List of comma separated file system specific options for the specified 111file system type, in the same format as 112.Xr mount 8 . 113.El 114.Sh FILES 115.Bl -tag -width /etc/fstab -compact 116.It Pa /etc/fstab 117file system table 118.El 119.Sh SEE ALSO 120.Xr mount 8 , 121.Xr fstab 5 , 122.Xr fsck_msdos 8 , 123.Xr fsck_ffs 8 124