Set quotas
You can assign a disk quota to a user using the edquota USER_NAME command. This command opens up the quota settings for the specific user in a text editor, like in this example:
As you can see from the output above, the current quota information for the user bob are shown. The first column represents the file system that has quotas enabled (/dev/sdc1 in this example). The second column shows how many blocks the user is currently using (5, one block equals 1 KB). The next two columns are used to set the soft and hard block limits for the user (0 means that no limits have been set). The inodes column shows how many inodes the user is currently using (4). The last two columns set the soft and hard inode limits for the user.
We can set the soft block limit to 6 and the hard block limit to 10:
Let’s see what will happen when bob exceeds the hard limit:
In the picture above you can see that the user bob is prevented from creating new files because his disk space usage is higher than the hard block limit.
To set a grace period (a time limit before the soft limit is enforced) on soft quotas, use the edquota command with the -t option:
To edit quotas for a group, use the edquota command with the -g option. For example, to edit quotas for the group named users, run the edquota -g users command. This will open up the quota settings for that group: