1.\" Copyright (c) 1983, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Robert Elz at The University of Melbourne. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. All advertising materials mentioning features or use of this software 16.\" must display the following acknowledgement: 17.\" This product includes software developed by the University of 18.\" California, Berkeley and its contributors. 19.\" 4. Neither the name of the University nor the names of its contributors 20.\" may be used to endorse or promote products derived from this software 21.\" without specific prior written permission. 22.\" 23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" from: @(#)edquota.8 8.2 (Berkeley) 4/27/95 36.\" $NetBSD: edquota.8,v 1.9 2002/12/04 21:01:13 bouyer Exp $ 37.\" 38.Dd December 4, 2002 39.Dt EDQUOTA 8 40.Os 41.Sh NAME 42.Nm edquota 43.Nd edit user quotas 44.Sh SYNOPSIS 45.Nm 46.Op Fl u 47.Op Fl f Ar filesystem 48.Op Fl p Ar proto-username 49.Ar username ... 50.Nm "" 51.Fl g 52.Op Fl f Ar filesystem 53.Op Fl p Ar proto-groupname 54.Ar groupname ... 55.Nm "" 56.Op Fl u 57.Op Fl f Ar filesystem 58.Op Fl h Ar block#/inode# 59.Op Fl s Ar block#/inode# 60.Ar username ... 61.Nm "" 62.Fl g 63.Op Fl f Ar filesystem 64.Op Fl h Ar block#/inode# 65.Op Fl s Ar block#/inode# 66.Ar groupname ... 67.Nm "" 68.Op Fl u 69.Op Fl f Ar filesystem 70.Fl t 71.Nm "" 72.Fl g 73.Op Fl f Ar filesystem 74.Fl t 75.Sh DESCRIPTION 76.Nm 77is a quota editor. 78By default, or if the 79.Fl u 80flag is specified, 81one or more users may be specified on the command line. 82Unless 83.Fl h 84or 85.Fl s 86are used, a temporary file is created for each user with an ASCII 87representation of the current disk quotas for that user. 88The list of filesystems with user quotas is determined from 89.Pa /etc/fstab . 90By default, quota for all quota-enabled filesystems are edited; the 91.Fl f 92option can be used to restrict it to a single filesystem. 93An editor is invoked on the ASCII file. 94The editor invoked is 95.Xr vi 1 96unless the environment variable 97.Ev EDITOR 98specifies otherwise. 99.Pp 100The quotas may then be modified, new quotas added, etc. 101Setting a quota to zero indicates that no quota should be imposed. 102Setting a hard limit to one indicates that no allocations should 103be permitted. 104Setting a soft limit to one with a hard limit of zero 105indicates that allocations should be permitted on 106only a temporary basis (see 107.Fl t 108below). 109The current usage information in the file is for informational purposes; 110only the hard and soft limits can be changed. 111.Pp 112On leaving the editor, 113.Nm 114reads the temporary file and modifies the binary 115quota files to reflect the changes made. 116.Pp 117If the 118.Fl p 119flag is specified, 120.Nm 121will duplicate the quotas of the prototypical user 122specified for each user specified. 123This is the normal mechanism used to initialize quotas for groups of users. 124.Pp 125The 126.Fl h 127and 128.Fl s 129flags can be used to change quota limits (soft and hard, respectively) 130without user interaction, for usage in e.g. batch scripts. 131The arguments are the new block and inode number limit, separated by a slash. 132.Pp 133If the 134.Fl g 135flag is specified, 136.Nm 137is invoked to edit the quotas of 138one or more groups specified on the command line. 139The 140.Fl p 141flag can be specified in conjunction with the 142.Fl g 143flag to specify a prototypical group 144to be duplicated among the listed set of groups. 145.Pp 146Users are permitted to exceed their soft limits 147for a grace period that may be specified per filesystem. 148Once the grace period has expired, 149the soft limit is enforced as a hard limit. 150The default grace period for a filesystem is specified in 151.Pa /usr/include/ufs/ufs/quota.h . 152The 153.Fl t 154flag can be used to change the grace period. 155By default, or when invoked with the 156.Fl u 157flag, the grace period is set for all the filesystems with user 158quotas specified in 159.Pa /etc/fstab . 160When invoked with the 161.Fl g 162flag the grace period is 163set for all the filesystems with group quotas specified in 164.Pa /etc/fstab . 165The grace period may be specified in days, hours, minutes, or seconds. 166Setting a grace period to zero indicates that the default 167grace period should be imposed. 168Setting a grace period to one second indicates that no 169grace period should be granted. 170.Pp 171Only the super-user may edit quotas. 172.Sh FILES 173.Bl -tag -width 24n -compact 174.It Pa quota.user 175at the filesystem root with user quotas 176.It Pa quota.group 177at the filesystem root with group quotas 178.It Pa /etc/fstab 179to find filesystem names and locations 180.El 181.Sh DIAGNOSTICS 182Various messages about inaccessible files; self-explanatory. 183.Sh SEE ALSO 184.Xr quota 1 , 185.Xr quotactl 2 , 186.Xr fstab 5 , 187.Xr quotacheck 8 , 188.Xr quotaon 8 , 189.Xr repquota 8 190