Set Quota on your Linux system
Further documentation
For more details, there are several man pages you can read:
$ man edquota (8) - edit user quotas
$ man quota (1) - display disk usage and limits
$ man quotacheck (8) - scan a file system for disk usages
$ man quotactl (2) - manipulate disk quotas
$ man quotaon, quotaoff (8) - turn file system quotas on and off
$ man repquota (8) - summarize quotas for a file system
$ man rquota (3) - implement quotas on remote machines
Commands
The commands listed below are some that we use often, but many more exist. Check the man page for more details and information.
Quota
Quota displays users’ disk usage and limits on a file system.
• To display user disk usage and limits, use the command:
[root@deep /]# quota -u wahib
Disk quotas for user wahib (uid 501):
Filesystem blocks quota limit grace files quota limit grace /dev/sda6 6001* 6000 0 none 7 0 0
• To display group quotas for the group of which the user is a member, use the command:
[root@deep /]# quota -g wahib
Disk quotas for group wahib (gid 501):
Filesystem blocks quota limit grace files quota limit grace /dev/sda6 5995* 5000 0 none 1 0 0
NOTE: If the group quota is not set for the user specified, you will receive the following message: Disk quotas for group wahib (gid 501): none
Repquota
Repquota produces summarized quota information of the disk usage and quotas for the specified file systems. Also, it prints for each user the current number of files and amount of space used (in kilobytes).
• Here is a sample output repquota gives (you results may vary): [root@deep /]# repquota -a