| QUOTACTL(2) | Linux Programmer's Manual | QUOTACTL(2) |
NAME
quotactl - manipulate disk quota
SYNOPSIS
#include <sys/types.h>
#include <sys/quota.h>
int quotactl(int cmd, const char *special, int id, caddr_t addr);
#include <linux/unistd.h>
#include <errno.h>
_syscall4(int, quotactl, int, cmd, const char *, special , int, id, caddr_t, addr)
DESCRIPTION
The quota system defines for each user and/or group a soft limit and a hard limit bounding the amount of disk space that can be used on a given file system. The hard limit cannot be crossed. The soft limit can be crossed, but warnings will ensue. Moreover, the user cannot be above the soft limit for more than one week (by default) at a time: after this week the soft limit counts as hard limit.
The quotactl() system call manipulates these quota. Its first argument is of the form QCMD(subcmd,type) where type is either USRQUOTA or GRPQUOTA (for user quota and group quota, respectively), and subcmd is described below.
The second argument special is the block special device these quota apply to. It must be mounted.
The third argument id is the user or group ID these quota apply to (when relevant).
The fourth argument addr is the address of a data structure, depending on the command.
The subcmd is one of
- Q_QUOTAON
- Enable quota. The addr argument is the pathname of the file containing the quota for the filesystem.
- Q_QUOTAOFF
- Disable quota.
- Q_GETQUOTA
- Get limits and current usage of disk space. The addr argument is a pointer to a dqblk structure (defined in <sys/quota.h>).
- Q_SETQUOTA
- Set limits and current usage; addr is as before.
- Q_SETQLIM
- Set limits; addr is as before.
- Q_SETUSE
- Set usage.
- Q_SYNC
- Sync disk copy of a filesystem's quota.
- Q_GETSTATS
- Get collected stats.
RETURN VALUE
On success, quotactl() returns 0. On error, -1 is returned, and errno is set appropriately.
ERRORS
- EACCES
- The quota file is not an ordinary file.
- EBUSY
- Q_QUOTAON was asked, but quota were enabled already.
- EFAULT
- Bad addr value.
- EINVAL
- type is not a known quota type. Or, special could not be found.
- EIO
- Cannot read or write the quota file.
- EMFILE
- Too many open files: cannot open quota file.
- ENODEV
- special cannot be found in the mount table.
- ENOPKG
- The kernel was compiled without quota support.
- ENOTBLK
- special is not a block special device.
- EPERM
- The process was not root (for the file system), and Q_GETQUOTA was asked for another id than that of the process itself, or anything other than Q_GETSTATS or Q_SYNC was asked.
- ESRCH
- Q_GETQUOTA or Q_SETQUOTA or Q_SETUSE or Q_SETQLIM was asked for a file system that didn't have quota enabled.
CONFORMING TO
BSD
SEE ALSO
quota(1), getrlimit(2), setrlimit(2), ulimit(3), quotacheck(8), quotaon(8)
| 1996-04-14 | Linux 1.3.88 |
Different Versions of this Page:
- Version 6.17 (latest)
- Version 6.16
- Version 6.15
- Version 6.14
- Version 6.13
- Version 6.12
- Version 6.11
- Version 6.10
- Version 6.9.1
- Version 6.9
- Version 6.8
- Version 6.7
- Version 6.06
- Version 6.05.01
- Version 6.05
- Version 6.04
- Version 6.03
- Version 6.02
- Version 6.01
- Version 6.00
- Version 5.13
- Version 5.12
- Version 5.11
- Version 5.10
- Version 5.09
- Version 5.08
- Version 5.07
- Version 5.06
- Version 5.05
- Version 5.04
- Version 5.03
- Version 5.02
- Version 5.01
- Version 5.00
- Version 4.16
- Version 4.15
- Version 4.14
- Version 4.13
- Version 4.12
- Version 4.10
- Version 4.09
- Version 4.08
- Version 4.07
- Version 4.06
- Version 4.05
- Version 4.04
- Version 4.03
- Version 4.02
- Version 4.01
- Version 4.00
- Version 3.83
- Version 3.82
- Version 3.81
- Version 3.80
- Version 3.79
- Version 3.78
- Version 3.77
- Version 3.76
- Version 3.75
- Version 3.74
- Version 3.73
- Version 3.72
- Version 3.71
- Version 3.70
- Version 3.69
- Version 3.68
- Version 3.67
- Version 3.66
- Version 3.65
- Version 3.64
- Version 3.63
- Version 3.62
- Version 3.61
- Version 3.60
- Version 3.59
- Version 3.58
- Version 3.57
- Version 3.56
- Version 3.55
- Version 3.54
- Version 3.53
- Version 3.52
- Version 3.49
- Version 3.48
- Version 3.47
- Version 3.46
- Version 3.45
- Version 3.44
- Version 3.43
- Version 3.42
- Version 3.41
- Version 3.40
- Version 3.39
- Version 3.38
- Version 3.37
- Version 3.36
- Version 3.35
- Version 3.34
- Version 3.33
- Version 3.32
- Version 3.31
- Version 3.30
- Version 3.29
- Version 3.28
- Version 3.27
- Version 3.26
- Version 3.25
- Version 3.24
- Version 3.23
- Version 3.22
- Version 3.21
- Version 3.20
- Version 3.17
- Version 3.16
- Version 3.15
- Version 3.14
- Version 3.13
- Version 3.12
- Version 3.11
- Version 3.10
- Version 3.09
- Version 3.08
- Version 3.07
- Version 3.06
- Version 3.05
- Version 3.04
- Version 3.03
- Version 3.02
- Version 3.01
- Version 3.00
- Version 2.80
- Version 2.79
- Version 2.78
- Version 2.77
- Version 2.76
- Version 2.75
- Version 2.74
- Version 2.73
- Version 2.72
- Version 2.71
- Version 2.70
- Version 2.69
- Version 2.68
- Version 2.67
- Version 2.66
- Version 2.65
- Version 2.64
- Version 2.63
- Version 2.62
- Version 2.61
- Version 2.60
- Version 2.59
- Version 2.58
- Version 2.57
- Version 2.56
- Version 2.55
- Version 2.54
- Version 2.53
- Version 2.52
- Version 2.51
- Version 2.50
- Version 2.49
- Version 2.48
- Version 2.47
- Version 2.46
- Version 2.45
- Version 2.44
- Version 2.43
- Version 2.42
- Version 2.41
- Version 2.40
- Version 2.39
- Version 2.38
- Version 2.37
- Version 2.36
- Version 2.35
- Version 2.34
- Version 2.33
- Version 2.32
- Version 2.31
- Version 2.30
- Version 2.29
- Version 2.28
- Version 2.27
- Version 2.26
- Version 2.25
- Version 2.24
- Version 2.23
- Version 2.22
- Version 2.21
- Version 2.20
- Version 2.19
- Version 2.18
- Version 2.17
- Version 2.16
- Version 2.15
- Version 2.14
- Version 2.13
- Version 2.12
- Version 2.11
- Version 2.10
- Version 2.09
- Version 2.08
- Version 2.07
- Version 2.06
- Version 2.05
- Version 2.04
- Version 2.03
- Version 2.02
- Version 2.01
- Version 2.00