.\" Copyright (c) 1983, 1990, 1991, 1993, 2002 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Robert Elz at The University of Melbourne. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)quotacheck.8 8.1 (Berkeley) 6/5/93 .\" .Dd October 17, 2002 .Dt QUOTACHECK 8 .Os BSD 4.2 .Sh NAME .Nm quotacheck .Nd filesystem quota consistency checker .Sh SYNOPSIS .Nm quotacheck .Op Fl g .Op Fl u .Op Fl v .Ar filesystem Ar ... .Nm quotacheck .Op Fl g .Op Fl u .Op Fl v .Fl a .Sh DESCRIPTION .Nm Quotacheck examines each filesystem, builds a table of current disk usage, and compares this table against that recorded in the disk quota file for the filesystem. If any inconsistencies are detected, both the quota file and the current system copy of the incorrect quotas are updated (the latter only occurs if an active filesystem is checked). By default both user and group quotas are checked. .Pp Available options: .Bl -tag -width Ds .It Fl a If the .Fl a flag is supplied in place of any filesystem names, .Nm quotacheck will check all the read-write filesystems with an existing mount option file at its root. The mount option file specifies the types of quotas that are to be checked. .It Fl g Only group quotas are checked. The mount option file, .Pa .quota.ops.group , must exist at the root of the filesystem. .It Fl u Only user quotas are checked. The mount option file, .Pa .quota.ops.user , must exist at the root of the filesystem. .It Fl v .Nm quotacheck reports discrepancies between the calculated and recorded disk quotas. .El .Pp Specifying both .Fl g and .Fl u is equivalent to the default. Parallel passes are run on the filesystems required, in an identical fashion to .Xr fsck 8 . .Pp Normally .Nm quotacheck operates silently. .Pp .Nm Quotacheck expects each filesystem being checked to have quota data files named .Pa .quota.user and/or .Pa .quota.group located at the filesystem root. If a binary data file is not present, .Nm quotacheck will create it. The default filename and root location cannot be overridden. .Pp .Nm Quotacheck is normally run at .Pa fsck time. .Pp .Nm Quotacheck accesses the raw device in calculating the actual disk usage for each user. Thus, the filesystems checked should be quiescent while .Nm quotacheck is running. .Sh FILES Each of the following quota files is located at the root of the mounted filesystem. The mount option files are empty files whose existence indicates that quotas are to be enabled for that filesystem. The binary data files will be created by quotacheck, if they don't already exist. .Pp .Bl -tag -width .quota.ops.group -compact .It Pa .quota.user data file containing user quotas .It Pa .quota.group data file containing group quotas .It Pa .quota.ops.user mount option file used to enable user quotas .It Pa .quota.ops.group mount option file used to enable group quotas .El .Sh SEE ALSO .Xr quota 1 , .Xr quotactl 2 , .Xr edquota 8 , .Xr fsck 8 , .Xr quotaon 8 , .Xr repquota 8 .Sh HISTORY The .Nm command appeared in .Bx 4.2 .