In Linux, quota uses Quota to limit the disk Quota of a specified user or user group in a partition. quota Limits the disk Quota by limiting the user's blocks or inodes. System Environment: Ubuntu 12.04 Server 1. install the disk quota tool quota Java code apt-get install quota 2. Modify the file/etc/fstab so that the file system supports quota: java code vi/etc/fstab (add the usrquota and kgquota parameters) #/was on/dev/sda1 during installation UUID = login/ext4 errors = remount-ro, usrquota, /, so that the modification takes effect: Java code mount-o remount/4. scan the file system and create a quota file for quota: Java code quotacheck-avug 5. Enable the quota function: Java code quotaon- Auvg 6. View usage statistics Java code repquota-augvs 7. Edit the account/group limit Java code [root @ www ~] # Edquota-u user1 Disk quotas for user user1 (uid 710): Filesystem blocks soft hard inodes soft hard/80 10000 10000 0 0 0 7 fields meaning: 1. filesystem: Specifies the target file system (or partition). 2. disk capacity (blocks): this value is calculated by quota. The unit is Kbytes. Do not change it manually. 3. soft: the soft limit of the disk capacity (block). Unit: KB4. hard: hard limit of the block, in KB; 5. number of archives (inodes): This is calculated by quota. The unit is the number. Do not change it manually. 6. soft: the soft limit value of inode; 7. hard: hard of inode Limit value; soft and hard mean: hard: indicates that the user's usage will never exceed the limit value. If the limit is exceeded, the system will lock the user's disk use right; soft: indicates that the user can use the disk normally when it is lower than the soft limit, but if it exceeds the soft limit and is lower than the hard limit, every time the user logs on to the system, the system sends a warning message indicating that the disk is about to fill up, and gives a grace period (7 days by default ). If the disk volume is not reduced to below soft within seven days, the disk limit will change to the soft limit value after seven days, and the disk use right will be locked and no new files will be added. When soft/hard is 0, it indicates there is no limit. The width and time limit are modified through edquota-t. 8. Test the Java code dd if =/dev/zero of = test20M bs = 1 M count = 20. When the created file exceeds the hard limit, the file will be created again, however, the size of the created file is limited.