| @@ -1,205 +1,200 @@ | | | @@ -1,205 +1,200 @@ |
1 | .\" Copyright (c) 1983, 1990, 1993 | | 1 | .\" Copyright (c) 1983, 1990, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | | 2 | .\" The Regents of the University of California. All rights reserved. |
3 | .\" | | 3 | .\" |
4 | .\" This code is derived from software contributed to Berkeley by | | 4 | .\" This code is derived from software contributed to Berkeley by |
5 | .\" Robert Elz at The University of Melbourne. | | 5 | .\" Robert Elz at The University of Melbourne. |
6 | .\" | | 6 | .\" |
7 | .\" Redistribution and use in source and binary forms, with or without | | 7 | .\" Redistribution and use in source and binary forms, with or without |
8 | .\" modification, are permitted provided that the following conditions | | 8 | .\" modification, are permitted provided that the following conditions |
9 | .\" are met: | | 9 | .\" are met: |
10 | .\" 1. Redistributions of source code must retain the above copyright | | 10 | .\" 1. Redistributions of source code must retain the above copyright |
11 | .\" notice, this list of conditions and the following disclaimer. | | 11 | .\" notice, this list of conditions and the following disclaimer. |
12 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 12 | .\" 2. Redistributions in binary form must reproduce the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer in the | | 13 | .\" notice, this list of conditions and the following disclaimer in the |
14 | .\" documentation and/or other materials provided with the distribution. | | 14 | .\" documentation and/or other materials provided with the distribution. |
15 | .\" 3. Neither the name of the University nor the names of its contributors | | 15 | .\" 3. Neither the name of the University nor the names of its contributors |
16 | .\" may be used to endorse or promote products derived from this software | | 16 | .\" may be used to endorse or promote products derived from this software |
17 | .\" without specific prior written permission. | | 17 | .\" without specific prior written permission. |
18 | .\" | | 18 | .\" |
19 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | | 19 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
20 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 20 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 21 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 22 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
23 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 23 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
24 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 24 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
25 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 25 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
26 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 26 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
27 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 27 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
28 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 28 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
29 | .\" SUCH DAMAGE. | | 29 | .\" SUCH DAMAGE. |
30 | .\" | | 30 | .\" |
31 | .\" from: @(#)edquota.8 8.2 (Berkeley) 4/27/95 | | 31 | .\" from: @(#)edquota.8 8.2 (Berkeley) 4/27/95 |
32 | .\" $NetBSD: edquota.8,v 1.14 2011/03/06 17:32:38 wiz Exp $ | | 32 | .\" $NetBSD: edquota.8,v 1.15 2012/01/30 19:17:29 dholland Exp $ |
33 | .\" | | 33 | .\" |
34 | .Dd February 6, 2011 | | 34 | .Dd January 29, 2012 |
35 | .Dt EDQUOTA 8 | | 35 | .Dt EDQUOTA 8 |
36 | .Os | | 36 | .Os |
37 | .Sh NAME | | 37 | .Sh NAME |
38 | .Nm edquota | | 38 | .Nm edquota |
39 | .Nd edit user quotas | | 39 | .Nd edit user quotas |
40 | .Sh SYNOPSIS | | 40 | .Sh SYNOPSIS |
41 | .Nm | | 41 | .Nm |
42 | .Op Fl DHu | | 42 | .Op Fl Hu |
43 | .Op Fl f Ar file-system | | 43 | .Op Fl f Ar file-system |
44 | .Op Fl p Ar proto-username | | 44 | .Op Fl p Ar proto-username |
45 | .Ar -d | | | 45 | .Ar -d | |
46 | .Ar username ... | | 46 | .Ar username ... |
47 | .Nm | | 47 | .Nm |
48 | .Op Fl DH | | 48 | .Op Fl H |
49 | .Fl g | | 49 | .Fl g |
50 | .Op Fl f Ar file-system | | 50 | .Op Fl f Ar file-system |
51 | .Op Fl p Ar proto-groupname | | 51 | .Op Fl p Ar proto-groupname |
52 | .Ar -d | | | 52 | .Ar -d | |
53 | .Ar groupname ... | | 53 | .Ar groupname ... |
54 | .Nm | | 54 | .Nm |
55 | .Op Fl DHu | | 55 | .Op Fl Hu |
56 | .Op Fl f Ar file-system | | 56 | .Op Fl f Ar file-system |
57 | .Op Fl h Ar block#/inode# | | 57 | .Op Fl h Ar block#/inode# |
58 | .Op Fl s Ar block#/inode# | | 58 | .Op Fl s Ar block#/inode# |
59 | .Op Fl t Ar block grace time/inode grace time | | 59 | .Op Fl t Ar block grace time/inode grace time |
60 | .Ar -d | | | 60 | .Ar -d | |
61 | .Ar username ... | | 61 | .Ar username ... |
62 | .Nm | | 62 | .Nm |
63 | .Op Fl DH | | 63 | .Op Fl H |
64 | .Fl g | | 64 | .Fl g |
65 | .Op Fl f Ar file-system | | 65 | .Op Fl f Ar file-system |
66 | .Op Fl h Ar block#/inode# | | 66 | .Op Fl h Ar block#/inode# |
67 | .Op Fl s Ar block#/inode# | | 67 | .Op Fl s Ar block#/inode# |
68 | .Op Fl t Ar block grace time/inode grace time | | 68 | .Op Fl t Ar block grace time/inode grace time |
69 | .Ar -d | | | 69 | .Ar -d | |
70 | .Ar groupname ... | | 70 | .Ar groupname ... |
71 | .Nm | | 71 | .Nm |
72 | .Op Fl DHu | | 72 | .Op Fl Hu |
73 | .Fl c | | 73 | .Fl c |
74 | .Op Fl f Ar file-system | | 74 | .Op Fl f Ar file-system |
75 | .Ar username ... | | 75 | .Ar username ... |
76 | .Nm | | 76 | .Nm |
77 | .Op Fl DH | | 77 | .Op Fl H |
78 | .Fl g | | 78 | .Fl g |
79 | .Fl c | | 79 | .Fl c |
80 | .Op Fl f Ar file-system | | 80 | .Op Fl f Ar file-system |
81 | .Ar groupname ... | | 81 | .Ar groupname ... |
82 | .Sh DESCRIPTION | | 82 | .Sh DESCRIPTION |
83 | .Nm | | 83 | .Nm |
84 | is a quota editor. | | 84 | is a quota editor. |
85 | By default, or if the | | 85 | By default, or if the |
86 | .Fl u | | 86 | .Fl u |
87 | flag is specified, | | 87 | flag is specified, |
88 | one or more users may be specified on the command line. | | 88 | one or more users may be specified on the command line. |
89 | Unless | | 89 | Unless |
90 | .Fl h , | | 90 | .Fl h , |
91 | .Fl s , | | 91 | .Fl s , |
92 | or | | 92 | or |
93 | .Fl t | | 93 | .Fl t |
94 | are used, a temporary file is created for each user with an ASCII | | 94 | are used, a temporary file is created for each user with an ASCII |
95 | representation of the current disk quotas and grace time for that user. | | 95 | representation of the current disk quotas and grace time for that user. |
96 | By default, quota for all quota-enabled file systems are edited; the | | 96 | By default, quota for all quota-enabled file systems are edited; the |
97 | .Fl f | | 97 | .Fl f |
98 | option can be used to restrict it to a single file system. | | 98 | option can be used to restrict it to a single file system. |
99 | An editor is invoked on the ASCII file. | | 99 | An editor is invoked on the ASCII file. |
100 | The editor invoked is | | 100 | The editor invoked is |
101 | .Xr vi 1 | | 101 | .Xr vi 1 |
102 | unless the environment variable | | 102 | unless the environment variable |
103 | .Ev EDITOR | | 103 | .Ev EDITOR |
104 | specifies otherwise. | | 104 | specifies otherwise. |
105 | .Pp | | 105 | .Pp |
106 | The quotas may then be modified, new quotas added, etc. | | 106 | The quotas may then be modified, new quotas added, etc. |
107 | Setting a quota to \- or unlimited indicates that no quota should be imposed. | | 107 | Setting a quota to \- or unlimited indicates that no quota should be imposed. |
108 | Setting a quota to zero indicates that no allocation is permited. | | 108 | Setting a quota to zero indicates that no allocation is permited. |
109 | Setting a soft limit to zero with a unlimited hard limit | | 109 | Setting a soft limit to zero with a unlimited hard limit |
110 | indicates that allocations should be permitted on only a temporary basis. | | 110 | indicates that allocations should be permitted on only a temporary basis. |
111 | The current usage information in the file is for informational purposes; | | 111 | The current usage information in the file is for informational purposes; |
112 | only the hard and soft limits, and grace time can be changed. | | 112 | only the hard and soft limits, and grace time can be changed. |
113 | .Pp | | 113 | .Pp |
114 | Users are permitted to exceed their soft limits | | 114 | Users are permitted to exceed their soft limits |
115 | for a grace period that may be specified per user (or per-file system | | 115 | for a grace period that may be specified per user (or per-file system |
116 | for quota version 1). | | 116 | for quota version 1). |
117 | Once the grace period has expired, | | 117 | Once the grace period has expired, |
118 | the soft limit is enforced as a hard limit. | | 118 | the soft limit is enforced as a hard limit. |
119 | The default grace period is one week. | | 119 | The default grace period is one week. |
120 | .Pp | | 120 | .Pp |
121 | By default, disk quotas are in KB, grace time in seconds. | | 121 | By default, disk quotas are in KB, grace time in seconds. |
122 | Disk and inodes quota can be entered with a | | 122 | Disk and inodes quota can be entered with a |
123 | .Xr humanize_number 9 | | 123 | .Xr humanize_number 9 |
124 | suffix (K for kilo, M for mega, G for giga, T for tera). | | 124 | suffix (K for kilo, M for mega, G for giga, T for tera). |
125 | Time can be entered with Y (year), W (week), D (day), H (hour) and M (minute) | | 125 | Time can be entered with Y (year), W (week), D (day), H (hour) and M (minute) |
126 | suffixes. | | 126 | suffixes. |
127 | Suffixes can be mixed (see | | 127 | Suffixes can be mixed (see |
128 | .Sx EXAMPLES | | 128 | .Sx EXAMPLES |
129 | below). | | 129 | below). |
130 | If the | | 130 | If the |
131 | .Fl H | | 131 | .Fl H |
132 | option if used, current quota, disk usage and time are displayed in | | 132 | option if used, current quota, disk usage and time are displayed in |
133 | a human-readable format. | | 133 | a human-readable format. |
134 | .Pp | | 134 | .Pp |
135 | On leaving the editor, | | 135 | On leaving the editor, |
136 | .Nm | | 136 | .Nm |
137 | reads the temporary file and modifies the on-disk quotas | | 137 | reads the temporary file and modifies the on-disk quotas |
138 | to reflect the changes made. | | 138 | to reflect the changes made. |
139 | .Pp | | 139 | .Pp |
140 | If the | | 140 | If the |
141 | .Fl p | | 141 | .Fl p |
142 | flag is specified, | | 142 | flag is specified, |
143 | .Nm | | 143 | .Nm |
144 | will duplicate the quotas of the prototypical user | | 144 | will duplicate the quotas of the prototypical user |
145 | specified for each user specified. | | 145 | specified for each user specified. |
146 | .Pp | | 146 | .Pp |
147 | The | | 147 | The |
148 | .Fl h , | | 148 | .Fl h , |
149 | .Fl s , | | 149 | .Fl s , |
150 | and | | 150 | and |
151 | .Fl t | | 151 | .Fl t |
152 | flags can be used to change quota limits (hard, soft and grace time, | | 152 | flags can be used to change quota limits (hard, soft and grace time, |
153 | respectively) without user interaction, for usage in e.g. batch scripts. | | 153 | respectively) without user interaction, for usage in e.g. batch scripts. |
154 | The arguments are the new block and inode number limit or grace time, | | 154 | The arguments are the new block and inode number limit or grace time, |
155 | separated by a slash. | | 155 | separated by a slash. |
156 | Units suffix may be used, as in the editor above. | | 156 | Units suffix may be used, as in the editor above. |
157 | .Pp | | 157 | .Pp |
158 | If the | | 158 | If the |
159 | .Fl g | | 159 | .Fl g |
160 | flag is specified, | | 160 | flag is specified, |
161 | .Nm | | 161 | .Nm |
162 | is invoked to edit the quotas of | | 162 | is invoked to edit the quotas of |
163 | one or more groups specified on the command line. | | 163 | one or more groups specified on the command line. |
164 | .Pp | | 164 | .Pp |
165 | With quota version 2, there is a per-file system user or group | | 165 | With quota version 2, there is a per-file system user or group |
166 | default quota to be copied to a user or group quota on the first | | 166 | default quota to be copied to a user or group quota on the first |
167 | allocation. | | 167 | allocation. |
168 | The | | 168 | The |
169 | .Fl d | | 169 | .Fl d |
170 | flag adds the default quota to the list of users or groups to edit. | | 170 | flag adds the default quota to the list of users or groups to edit. |
171 | .Pp | | 171 | .Pp |
172 | For quota version 1, there is no default block/inode quota, and no | | 172 | For quota version 1, there is no default block/inode quota, and no |
173 | per-user/group grace time. | | 173 | per-user/group grace time. |
174 | To edit the file system-wide grace time, use | | 174 | To edit the file system-wide grace time, use |
175 | .Fl d . | | 175 | .Fl d . |
176 | .Pp | | 176 | .Pp |
177 | On quota2-enabled file systems, the | | 177 | On quota2-enabled file systems, the |
178 | .Fl c | | 178 | .Fl c |
179 | flag cause edquota to clear quota entries for the specified users or groups. | | 179 | flag cause edquota to clear quota entries for the specified users or groups. |
180 | If disk or inode usages is not 0, limits are reverted to the default quota. | | 180 | If disk or inode usages is not 0, limits are reverted to the default quota. |
181 | If disk and inode usages are 0, the existing quota entries are freed. | | 181 | If disk and inode usages are 0, the existing quota entries are freed. |
182 | .Pp | | 182 | .Pp |
183 | The | | | |
184 | .Fl D | | | |
185 | flag cause edquota to print to the standard error property lists sent to | | | |
186 | and received from the kernel. | | | |
187 | .Pp | | | |
188 | Only the super-user may edit quotas. | | 183 | Only the super-user may edit quotas. |
189 | .Sh EXAMPLES | | 184 | .Sh EXAMPLES |
190 | Edit quotas for group games on all quota-enabled file systems: | | 185 | Edit quotas for group games on all quota-enabled file systems: |
191 | .Dl edquota -g | | 186 | .Dl edquota -g |
192 | Set 4MB hard block limit, 2MB soft block limit, 2048 inode hard limit, | | 187 | Set 4MB hard block limit, 2MB soft block limit, 2048 inode hard limit, |
193 | 1024 inode soft limit, 2 weeks and 3 days (or 17 days) block and inode grace | | 188 | 1024 inode soft limit, 2 weeks and 3 days (or 17 days) block and inode grace |
194 | time for the default quotas on file system | | 189 | time for the default quotas on file system |
195 | .Pa /home : | | 190 | .Pa /home : |
196 | .Dl edquota -h 4M/2k -s 2M/1k -t 2W3D/2W3D -f /home -u -d | | 191 | .Dl edquota -h 4M/2k -s 2M/1k -t 2W3D/2W3D -f /home -u -d |
197 | .Sh SEE ALSO | | 192 | .Sh SEE ALSO |
198 | .Xr quota 1 , | | 193 | .Xr quota 1 , |
199 | .Xr quotactl 2 , | | 194 | .Xr quotactl 2 , |
200 | .Xr humanize_number 3 , | | 195 | .Xr humanize_number 3 , |
201 | .Xr fstab 5 , | | 196 | .Xr fstab 5 , |
202 | .Xr quotacheck 8 , | | 197 | .Xr quotacheck 8 , |
203 | .Xr quotactl 8 , | | 198 | .Xr quotactl 8 , |
204 | .Xr quotaon 8 , | | 199 | .Xr quotaon 8 , |
205 | .Xr repquota 8 | | 200 | .Xr repquota 8 |