1afd66061Sbostic.\" Copyright (c) 1983, 1990, 1993 2afd66061Sbostic.\" The Regents of the University of California. All rights reserved. 3c9dc4fe0Smckusick.\" 412f38975Smckusick.\" This code is derived from software contributed to Berkeley by 512f38975Smckusick.\" Robert Elz at The University of Melbourne. 612f38975Smckusick.\" 7c1f1b8a7Strent.\" %sccs.include.redist.man% 848b24d14Sbostic.\" 9*42d7cb1eSbostic.\" @(#)edquota.8 8.2 (Berkeley) 04/27/95 10c9dc4fe0Smckusick.\" 11*42d7cb1eSbostic.Dd "" 12*42d7cb1eSbostic.Dt EDQUOTA 8 13*42d7cb1eSbostic.Os 14*42d7cb1eSbostic.Sh NAME 15*42d7cb1eSbostic.Nm edquota 16*42d7cb1eSbostic.Nd edit user quotas 17*42d7cb1eSbostic.Sh SYNOPSIS 18*42d7cb1eSbostic.Nm edquota 19*42d7cb1eSbostic.Op Fl u 20*42d7cb1eSbostic.Op Fl p Ar proto-username 21*42d7cb1eSbostic.Ar username ... 22*42d7cb1eSbostic.Nm edquota 23*42d7cb1eSbostic.Fl g 24*42d7cb1eSbostic.Op Fl p Ar proto-groupname 25*42d7cb1eSbostic.Ar groupname ... 26*42d7cb1eSbostic.Nm edquota 27*42d7cb1eSbostic.Fl t 28*42d7cb1eSbostic.Op Fl u 29*42d7cb1eSbostic.Nm edquota 30*42d7cb1eSbostic.Fl t 31*42d7cb1eSbostic.Fl g 32*42d7cb1eSbostic.Sh DESCRIPTION 33*42d7cb1eSbostic.Nm Edquota 3412f38975Smckusickis a quota editor. 35*42d7cb1eSbosticBy default, or if the 36*42d7cb1eSbostic.Fl u 37*42d7cb1eSbosticflag is specified, 3812f38975Smckusickone or more users may be specified on the command line. 39c9dc4fe0SmckusickFor each user a temporary file is created 40c9dc4fe0Smckusickwith an ASCII representation of the current 4112f38975Smckusickdisk quotas for that user. 4212f38975SmckusickThe list of filesystems with user quotas is determined from 43*42d7cb1eSbostic.Pa /etc/fstab . 4412f38975SmckusickAn editor is invoked on the ASCII file. 4512f38975SmckusickThe editor invoked is 46*42d7cb1eSbostic.Xr vi 1 47*42d7cb1eSbosticunless the environment variable 48*42d7cb1eSbostic.Ev EDITOR 49*42d7cb1eSbosticspecifies otherwise. 50*42d7cb1eSbostic.Pp 5112f38975SmckusickThe quotas may then be modified, new quotas added, etc. 5212f38975SmckusickSetting a quota to zero indicates that no quota should be imposed. 5312f38975SmckusickSetting a hard limit to one indicates that no allocations should 5412f38975Smckusickbe permitted. 5512f38975SmckusickSetting a soft limit to one with a hard limit of zero 5612f38975Smckusickindicates that allocations should be permitted on 57*42d7cb1eSbosticonly a temporary basis (see 58*42d7cb1eSbostic.Fl t 59*42d7cb1eSbosticbelow). 6012f38975SmckusickThe current usage information in the file is for informational purposes; 6112f38975Smckusickonly the hard and soft limits can be changed. 62*42d7cb1eSbostic.Pp 6312f38975SmckusickOn leaving the editor, 64*42d7cb1eSbostic.Nm edquota 65c9dc4fe0Smckusickreads the temporary file and modifies the binary 66c9dc4fe0Smckusickquota files to reflect the changes made. 67*42d7cb1eSbostic.Pp 68c9dc4fe0SmckusickIf the 69*42d7cb1eSbostic.Fl p 70*42d7cb1eSbosticflag is specified, 71*42d7cb1eSbostic.Nm edquota 72c9dc4fe0Smckusickwill duplicate the quotas of the prototypical user 7312f38975Smckusickspecified for each user specified. 7412f38975SmckusickThis is the normal mechanism used to 7512f38975Smckusickinitialize quotas for groups of users. 76*42d7cb1eSbostic.Pp 77*42d7cb1eSbosticIf the 78*42d7cb1eSbostic.Fl g 79*42d7cb1eSbosticflag is specified, 80*42d7cb1eSbostic.Nm edquota 8112f38975Smckusickis invoked to edit the quotas of 8212f38975Smckusickone or more groups specified on the command line. 83*42d7cb1eSbosticThe 84*42d7cb1eSbostic.Fl p 85*42d7cb1eSbosticflag can be specified in conjunction with 86*42d7cb1eSbosticthe 87*42d7cb1eSbostic.Fl g 88*42d7cb1eSbosticflag to specify a prototypical group 8912f38975Smckusickto be duplicated among the listed set of groups. 90*42d7cb1eSbostic.Pp 9112f38975SmckusickUsers are permitted to exceed their soft limits 9212f38975Smckusickfor a grace period that may be specified per filesystem. 9312f38975SmckusickOnce the grace period has expired, 9412f38975Smckusickthe soft limit is enforced as a hard limit. 9512f38975SmckusickThe default grace period for a filesystem is specified in 96*42d7cb1eSbostic.Pa /usr/include/ufs/ufs/quota.h . 97*42d7cb1eSbosticThe 98*42d7cb1eSbostic.Fl t 99*42d7cb1eSbosticflag can be used to change the grace period. 100*42d7cb1eSbosticBy default, or when invoked with the 101*42d7cb1eSbostic.Fl u 102*42d7cb1eSbosticflag, the grace period is set for all the filesystems with user 10312f38975Smckusickquotas specified in 104*42d7cb1eSbostic.Pa /etc/fstab . 105*42d7cb1eSbosticWhen invoked with the 106*42d7cb1eSbostic.Fl g 107*42d7cb1eSbosticflag the grace period is 10812f38975Smckusickset for all the filesystems with group quotas specified in 109*42d7cb1eSbostic.Pa /etc/fstab . 11012f38975SmckusickThe grace period may be specified in days, hours, minutes, or seconds. 11112f38975SmckusickSetting a grace period to zero indicates that the default 11212f38975Smckusickgrace period should be imposed. 11312f38975SmckusickSetting a grace period to one second indicates that no 11412f38975Smckusickgrace period should be granted. 115*42d7cb1eSbostic.Pp 116c9dc4fe0SmckusickOnly the super-user may edit quotas. 117*42d7cb1eSbostic.Sh FILES 118*42d7cb1eSbostic.Bl -tag -width 24n -compact 119*42d7cb1eSbostic.It Pa quota.user 120*42d7cb1eSbosticat the filesystem root with user quotas 121*42d7cb1eSbostic.It Pa quota.group 122*42d7cb1eSbosticat the filesystem root with group quotas 123*42d7cb1eSbostic.It Pa /etc/fstab 124*42d7cb1eSbosticto find filesystem names and locations 125*42d7cb1eSbostic.El 126*42d7cb1eSbostic.Sh SEE ALSO 127*42d7cb1eSbostic.Xr quota 1 , 128*42d7cb1eSbostic.Xr quotactl 2 , 129*42d7cb1eSbostic.Xr fstab 5 , 130*42d7cb1eSbostic.Xr quotacheck 8 , 131*42d7cb1eSbostic.Xr quotaon 8 , 132*42d7cb1eSbostic.Xr repquota 8 133*42d7cb1eSbostic.Sh DIAGNOSTICS 134c9dc4fe0SmckusickVarious messages about inaccessible files; self-explanatory. 135