quota
Display disk usage and limits
TLDR
Show disk quotas in human-readable units for the current user
Verbose output (also display quotas on filesystems where no storage is allocated)
Quiet output (only display quotas on filesystems where usage is over quota)
Print quotas for the groups of which the current user is a member
Show disk quotas for another user
SYNOPSIS
quota [options] [user|group]...
PARAMETERS
-u, --user
Displays user quotas. This is the default if no option is given and a user is specified.
-g, --group
Displays group quotas.
-q, --quiet
Suppresses verbose messages and only prints filesystems where usage is over quota.
-v, --verbose
Displays quotas on all mounted filesystems, even those with no disk usage or limits.
-s, --softonly
Prints only entries where a soft limit is exceeded and the grace period is active.
-h, --human-readable
Shows sizes in human-readable units (e.g., K, M, G).
-l, --local-only
Skips querying remote filesystems (like NFS or CIFS shares).
-F <format-name>, --filesystem-format=<format-name>
Specifies the quota format to use (e.g., 'vfsold', 'vfsv0', 'vfsv1'). Useful for specific filesystem types.
-f <filesystem>, --file=<filesystem>
Specifies a particular filesystem to query. If omitted, all quota-enabled filesystems are checked.
DESCRIPTION
The quota command is a Linux utility used to display disk usage and limits for users and groups on filesystems where quotas are enabled. Disk quotas are a system feature that allows administrators to set limits on the amount of disk space and/or the number of files (inodes) that a user or group can consume on a particular filesystem.
When executed, quota shows the current disk block usage, inode usage, and the configured soft and hard limits for the calling user or specified user/group. It also indicates if a grace period is active, meaning a soft limit has been exceeded but the hard limit has not yet been enforced. This command is crucial for users to monitor their disk consumption and avoid hitting their allocated limits, and for administrators to quickly check compliance.
It provides a snapshot of current quota status but does not allow modification of quota settings; that functionality is handled by commands like edquota or setquota.
CAVEATS
- quota only displays information; it cannot be used to modify quota settings. Use edquota or setquota for modifications.
- Quotas must be enabled and properly configured on a filesystem for quota to display any relevant information.
- Viewing another user's or group's quotas often requires root privileges.
- The output can be confusing without understanding the concepts of soft limits, hard limits, and grace periods.
SOFT VS. HARD LIMITS
Soft limits are warnings; users are allowed to temporarily exceed them. If the soft limit is exceeded, a grace period begins. If usage remains above the soft limit after the grace period expires, the soft limit effectively becomes a hard limit.
Hard limits are absolute; users cannot write any more data or create more files once this limit is reached, even if the grace period has not expired.
GRACE PERIOD
When a user or group exceeds their soft limit, a 'grace period' (typically 7 days) starts. During this period, they can still write data. If usage drops below the soft limit within the grace period, the timer resets. If not, the soft limit becomes a hard limit until usage is reduced. The quota command displays the remaining time for active grace periods.
INODES
In addition to disk block usage (storage space), quotas can also be applied to the number of inodes a user or group can consume. An inode is a data structure on a Unix-like filesystem that stores information about a file or directory, such as its permissions, ownership, and physical location on disk. Even if a user has free disk space, they might hit an inode limit if they create many small files.
HISTORY
Disk quota systems have been a fundamental feature of Unix-like operating systems since their early development to manage shared disk resources. The quota command, as part of the broader quota utilities suite, has been a standard component of Linux distributions for decades, providing users and administrators with a simple way to monitor disk usage against predefined limits. Its functionality has remained largely consistent, focusing on robust reporting.
SEE ALSO
edquota(8), repquota(8), quotacheck(8), setquota(8)