"A disk quota is a limit set by a system administrator that restricts certain aspects of file system usage on modern operating systems. The function of setting diskquota to disks, is to allocate limited diskspace in a reasonable way."

Example setup

sets the following restrictions: the Template:Codeline limit means that once testuser uses over 10MB of space a warning gets ensued, and after a period of time the soft limit gets enforced. The Template:Codeline limit is stricter, so to speak; a user cannot go over this limit.

To alter the grace period:

# edquota -t

Managing

Checking for quota limits and advanced operations

Basics

Use this command to check for quotas on a specific partition:

# repquota /home

Use this command to check for all quotas that apply to a user:

# quota -u $USER

for groups;

# quota -g $GROUP

Copying quotas

The idea is to make a temporary user acount, modify the quota settings for that user, and then copy the generated quota files for all users to use. After setting quota settings for quotauser, copy the settings:

# edquota -p quotauser `awk -F: '$3 > 999 {print $1}' /etc/passwd`

This applies the settings to users with a UID equal to or greater than 1000.

Other commands

There are several useful commands:

repquota -a # Shows the status on diskusage
warnquota # Can be used to warn the users about their quota
setquota # Non-interactive quota setting--useful for scripting