1QUOTATOOL(8) System Manager's Manual QUOTATOOL(8)
2
3
4
6 quotatool - manipulate filesystem quotas
7
9 quotatool [-u [:]uid | -g [:]gid] [-b | -i] [-r | -l NUM | -q NUM]
10 [-nvR] [-d] filesystem
11 quotatool (-u | -g) (-b | -i) -t TIME [-nv] filesystem
12 quotatool [-hV]
13
15 quotatool is a tool for manipulating filesystem quotas. Depending on
16 the commandline options given, it can set hard or soft limits on block
17 and inode usage, set and reset grace periods, for both users and (if
18 your system supports this) groups. The filesystem to set the quota on
19 is given as the first (and only) non-option element, and it is either
20 the block special file (i.e /dev/sda3) or the mount point (i.e. /home)
21 for the filesystem.
22
24 -u [[:]uid]
25 Set user quotas
26
27 -g [[:]gid]
28 Set group quotas
29
30 uid and gid are either the numerical ID of the user or group, or its
31 name in the /etc/passwd and /etc/group files. Prefix : allows using
32 numerical uid/gid not present in /etc/passwd or /etc/group.
33
34 -b Set block quotas [default]
35
36 -i Set inode quotas
37
38 The -b and -i options are persistent -- they stay in effect until they
39 are overridden.
40
41 -R Only raise quotas, never lower. Makes sure you don't acciden‐
42 tally lower quotas for a user/group.
43
44 -t TIME
45 Set the system-wide grace period to TIME. TIME consists of an
46 optional '-' or '+' character, a number, and optionally one of
47 the following modifiers: "seconds", "minutes", "hours", "days",
48 "weeks", or "months". Unique abbreviations (e.g. "s", "mo") are
49 also accepted. The default is "seconds". The argument should be
50 preceded by -u|-g and -b|-i
51
52 -r Reset the grace period
53
54 -l NUM Set hard limit to NUM
55
56 -q NUM Set soft limit (quota) to NUM
57
58 NUM consists of an optional '-' or '+' character, a number (integer or
59 floating point), and optionally one of the following modifiers: "Kb",
60 "Mb", "Gb", "Tb", "bytes", or "blocks". Unique abbreviations are also
61 accepted. The default is "blocks". Modifiers are base 2 for block quo‐
62 tas (1k = 1024), and base 10 for inode quotas (1k = 1000)
63
64 If +/- is supplied, the existing quota is increased or reduced by the
65 specified amount.
66
67 -d Dump quota info for user/group in a machine readable format:
68
69 |------- BLOCKS --------| |-------- FILES
70 --------|
71 uid/gid mountpoint current quota limit grace current quota limit
72 grace
73
74 grace is the number of seconds from now until the grace time
75 ends. May be negative = time already passed. When quota is not
76 passed, grace is zero.
77
78 -n dry-run: show what would have been done but don't change any‐
79 thing. Use together with -v
80
81 -v Verbose output. Use twice or thrice for even more output (debug‐
82 ging)
83
84 -h Print a usage message to stdout and exit successfully
85
86 -V Print version information to stdout and exit successfully
87
89 On Linux, quotatool works with both "old", "vfsv0" and "vfsv1" +
90 "generic" kernel-quota formats. Supported filesystems: ext2, ext3,
91 ext4, ReiserFS and XFS.
92
93 Mac OS X: hfs
94
95 FreeBSD / OpenBSD / NetBSD: filesystems ufs and ffs
96
98 Set soft block limit to 800Mb, hard block limit to 1.2 Gb for user mpg4
99 on /home:
100
101 quotatool -u mpg4 -b -q 800M -l 1.2G /home
102
103 Raise soft block limit by 100M for non-existent gid 12345 on
104 /dev/loop3:
105
106 quotatool -g :12345 -b -q +100M /dev/loop3
107
108 Set soft inode limit to 1.8k (1800), hard inode limit to 2000 for user
109 johan on /var:
110
111 quotatool -u johan -i -q 1.8K -l 2000 /var
112
113 Set the global block grace period to one week on /home:
114
115 quotatool -u -b -t "1 week" /home
116
117 Restart inode grace period for user johan on root filesystem:
118
119 quotatool -u johan -i -r /
120
121
123 Grace periods are set on a "global per quotatype and filesystem" basis
124 only. Each quotatype (usrquota / grpquota) on each filesystem has two
125 grace periods - one for block limits and one for inode limits. It is
126 not possible to set different grace periods for users on the same
127 filesystem.
128
129 According to 'man quotactl', global grace periods should be supported
130 on BSD. quotatool on BSD does the right thing, which can be confirmed
131 with 'edquota -t'. However, the value doesn't seem to be used by the
132 system when usage passes a soft limit.
133
134 So far, I haven't been able to make global grace periods work on Mac OS
135 X, either with 'edquota -t' or quotatool.
136
137 Using non-existent uids/gids like ":12345" can be useful when configur‐
138 ing quotas on a mounted filesystem which is a separate system in it
139 self, like when preparing an install image or repairing a filesystem
140 from another installation.
141
142 Limit arguments can be specified in several ways, these are all equiva‐
143 lent:
144 1M
145 1m
146 1Mb
147 1 "Mb"
148
149 Use +/- to raise/lower quotas relative to current limits
150
151 Use -v (or -v -v) to see verbose/debug info when running commands
152
153
155 quota.user , quota.group (linux, *BSD, aix)
156 .quota.user , .quota.group (Mac OS X)
157 quotas (solaris, ...)
158
160 Please check https://github.com/ekenberg/quotatool for any open issues.
161 Feel free to add a new issue if you find an unresolved bug!
162
163 Calling quotatool with more than one -v option will cause a segfault on
164 some systems. This will happen if vprintf (3) fails to check for NULL
165 arguments. GNU libc doesn't have this problem, solaris libc does.
166
168 quota(1), quotactl(2), edquota(8), quotacheck(8), quotaon(8),
169 repquota(8)
170
171
172
173version 1.6.2 1999 - 2013 QUOTATOOL(8)