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.\" @(#)edquota.8 8.1 (Berkeley) 6/6/93 36.\" $FreeBSD$ 37.\" 38.Dd June 6, 1993 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 fspath 48.Op Fl p Ar proto-username 49.Ar username ... 50.Nm 51.Op Fl u 52.Fl e 53.Sm off 54.Ar fspath Op : Ar bslim Op : Ar bhlim Op : Ar islim Op : Ar ihlim 55.Sm on 56.Op Fl e Ar ... 57.Ar username ... 58.Nm 59.Fl g 60.Op Fl f Ar fspath 61.Op Fl p Ar proto-groupname 62.Ar groupname ... 63.Nm 64.Fl g 65.Fl e 66.Sm off 67.Ar fspath Op : Ar bslim Op : Ar bhlim Op : Ar islim Op : Ar ihlim 68.Sm on 69.Op Fl e Ar ... 70.Ar groupname ... 71.Nm 72.Fl t 73.Op Fl u 74.Op Fl f Ar fspath 75.Nm 76.Fl t 77.Fl g 78.Op Fl f Ar fspath 79.Sh DESCRIPTION 80The 81.Nm 82utility is a quota editor. 83By default, or if the 84.Fl u 85flag is specified, 86one or more users may be specified on the command line. 87For each user a temporary file is created 88with an 89.Tn ASCII 90representation of the current 91disk quotas for that user. 92The list of file systems with user quotas is determined from 93.Pa /etc/fstab . 94An editor is invoked on the 95.Tn ASCII 96file. 97The editor invoked is 98.Xr vi 1 99unless the environment variable 100.Ev EDITOR 101specifies otherwise. 102.Pp 103The quotas may then be modified, new quotas added, etc. 104Setting a quota to zero indicates that no quota should be imposed. 105Setting a hard limit to one indicates that no allocations should 106be permitted. 107Setting a soft limit to one with a hard limit of zero 108indicates that allocations should be permitted only on 109a temporary basis (see 110.Fl t 111below). 112The current usage information in the file is for informational purposes; 113only the hard and soft limits can be changed. 114.Pp 115On leaving the editor, 116.Nm 117reads the temporary file and modifies the binary 118quota files to reflect the changes made. 119.Pp 120If the 121.Fl p 122option is specified, 123.Nm 124will duplicate the quotas of the prototypical user 125specified for each user specified. 126This is the normal mechanism used to 127initialize quotas for groups of users. 128If the user given to assign quotas to is a numerical uid 129range (e.g. 1000-2000), then 130.Nm 131will duplicate the quotas of the prototypical user 132for each uid in the range specified. This allows 133for easy setup of default quotas for a group of users. 134The uids in question do not have to be currently assigned in 135.Pa /etc/passwd . 136.Pp 137If one or more 138.Fl e 139.Sm off 140.Ar fspath Op : Ar bslim Op : Ar bhlim Op : Ar islim Op : Ar ihlim 141.Sm on 142options are specified, 143.Nm 144will non-interactively set quotas defined by 145.Ar bslim , bhlim , islim , 146and 147.Ar ihlim 148on each particular file system referenced by 149.Ar fspath . 150Here 151.Ar bslim 152is the soft limit on the number of blocks, 153.Ar bslim 154is the hard limit on the number of blocks, 155.Ar islim 156is the soft limit on the number of files, and 157.Ar ihlim 158is the hard limit on the number of files. 159If any of the 160.Ar bslim , bhlim , islim , 161and 162.Ar ihlim 163values is omitted, it is assumed to be zero, therefore 164indicating that no particular quota should be imposed. 165.Pp 166If invoked with the 167.Fl f 168option, 169.Nm 170will read and modify quotas on the file system specified by 171.Ar fspath 172only. 173The 174.Ar fspath 175argument may be either a special device 176or a file system mount point. 177The primary purpose of this option is to set the scope for the 178.Fl p 179option, which would overwrite quota records on every 180file system with quotas otherwise. 181.Pp 182If the 183.Fl g 184flag is specified, 185.Nm 186is invoked to edit the quotas of 187one or more groups specified on the command line. 188The 189.Fl p 190flag can be specified in conjunction with 191the 192.Fl g 193flag to specify a prototypical group 194to be duplicated among the listed set of groups. 195Similarly, 196.Fl e 197flag can be specified in conjunction with 198the 199.Fl g 200flag to non-interactively set-up quotas on the listed set 201of groups. 202.Pp 203Users are permitted to exceed their soft limits 204for a grace period that may be specified per file system. 205Once the grace period has expired, 206the soft limit is enforced as a hard limit. 207The default grace period for a file system is specified in 208.In ufs/ufs/quota.h . 209The 210.Fl t 211flag can be used to change the grace period. 212By default, or when invoked with the 213.Fl u 214flag, 215the grace period is set for all the file systems with user 216quotas specified in 217.Pa /etc/fstab . 218When invoked with the 219.Fl g 220flag the grace period is 221set for all the file systems with group quotas specified in 222.Pa /etc/fstab . 223The grace period may be specified in days, hours, minutes, or seconds. 224Setting a grace period to zero indicates that the default 225grace period should be imposed. 226Setting a grace period to one second indicates that no 227grace period should be granted. 228.Pp 229Only the super-user may edit quotas. 230.Sh FILES 231.Bl -tag -width quota.group -compact 232.It Pa quota.user 233at the file system root with user quotas 234.It Pa quota.group 235at the file system root with group quotas 236.It Pa /etc/fstab 237to find file system names and locations 238.El 239.Sh SEE ALSO 240.Xr quota 1 , 241.Xr quotactl 2 , 242.Xr fstab 5 , 243.Xr quotacheck 8 , 244.Xr quotaon 8 , 245.Xr repquota 8 246.Sh DIAGNOSTICS 247Various messages about inaccessible files; self-explanatory. 248