The quota command is a Linux utility that allows you to view and set disk quotas for users and groups on a filesystem. Disk quotas are used to limit the amount of disk space and number of inodes that a user or group can consume on a filesystem.
To use the quota command, you must first enable quota support on the filesystem by adding the usrquota or grpquota option to the fstab file. Then, you can use the quotaon command to enable quotas on the filesystem. You can also use the repquota command to generate a report showing the current quota usage for all users and groups on a filesystem.
Note that quota support is not available on all Linux filesystems. It is typically used on servers where disk space is a limited resource and it is important to ensure that individual users or groups do not consume too much space.
quota Command Examples
1. To report the quota for current user:
# quota # quota -u mike (for mike) # quota --user mike (for mike) # quota mike (for mike)
2. To show the group quotas:
# quota -g SUPPORT # quota -group SUPPORT
3. To set to verbose mode:
# quota -v # quota --verbose
4. To see the output in human readable format:
# quota -s # quota --human-readable
5. To report time in seconds since epoch when his grace time runs out, in grace period:
# quota -p # quota --raw-grace
6. To ignore mountpoints mounted by automounter:
# quota -i # quota --no-autofs
7. To report quotas only on local filesystems:
# quota -l # quota --local-only
8. To specify the trailing slashes after the NFSv4 mountpoints:
# quota -m # quota --no-mixed-pathnames
9. To print a more terse message:
# quota -q # quota --quiet
10. To do not print error message if connection to rpc.rquotad is refused:
# quota -Q # quota --quiet-refuse
11. To do not wrap the line if the device name is too long:
# quota -w # quota --no-wrap
12. To get the help for quota:
# quota --help
13. To get the version:
# quota -V # quota --version