1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" FIXME There is much that is missing and/or out of date in this page.
26 .\" (There is a quotactl.2 page in the quotactl package that seems to
27 .\" have more info than this page.)
28 .\" As things stand the page more or less documents Linux 2.2 reality:
36 .\" Q_RSQUASH (not currently documented)
55 .\" Q_V1_GETQUOTA Q_V1_GETSTATS Q_V1_RSQUASH Q_V1_SETQLIM
56 .\" Q_V1_SETQUOTA Q_V1_SETUSE
57 .\" Q_V2_GETINFO Q_V2_GETQUOTA Q_V2_SETFLAGS Q_V2_SETGRACE
58 .\" Q_V2_SETINFO Q_V2_SETQUOTA Q_V2_SETUSE
59 .\" Q_XGETQSTAT Q_XGETQUOTA Q_XQUOTAOFF Q_XQUOTAON Q_XQUOTARM
80 .TH QUOTACTL 2 2007-06-01 "Linux" "Linux Programmer's Manual"
82 quotactl \- manipulate disk quota
85 .B #include <sys/types.h>
87 .B #include <sys/quota.h>
89 .BI "int quotactl(int " cmd ", const char *" special ", int " id \
93 The quota system defines for each user and/or group a soft limit
94 and a hard limit bounding the amount of disk space that can be
95 used on a given file system.
96 The hard limit cannot be crossed.
97 The soft limit can be crossed, but warnings will ensue.
99 the user cannot be above the soft limit for more than one week (by default)
100 at a time: after this week the soft limit counts as hard limit.
104 system call manipulates these quota.
105 Its first argument is
107 .BI QCMD( subcmd , type )
114 (for user quota and group quota, respectively), and
120 is the block special device these quota apply to.
125 is the user or group ID these quota apply to (when relevant).
129 is the address of a data structure, depending on the command.
139 argument is the pathname of the file containing
140 the quota for the file system.
146 Get limits and current usage of disk space.
149 argument is a pointer to a dqblk structure (defined in
153 Set limits and current usage;
166 Sync disk copy of a file system's quota.
174 On error, \-1 is returned, and
176 is set appropriately.
180 The quota file is not an ordinary file.
184 was asked, but quotas were enabled already.
193 is not a known quota type.
199 Cannot read or write the quota file.
202 Too many open files: cannot open quota file.
206 cannot be found in the mount table.
209 The kernel was compiled without quota support.
213 is not a block special device.
216 The process was not root (for the file system), and
218 was asked for another
220 than that of the process itself, or anything other than
234 was asked for a file system that didn't have quota enabled.