Securing and Optimizing Linux: RedHat Edition -A Hands on Guide | ||
---|---|---|
Prev | Chapter 20. Set Limits using Qouta | Next |
Consider, for example, you have a group with the group id webusers on your system. The following command takes you into the vi editor to edit quotas for the group webusers on each partition that has quotas enabled: To edit and modify quota for group webusers, use the following command:
[root@deep] /# edquota -g webusers |
Quotas for group webusers: /dev/sda6: blocks in use: 6, limits (soft = 0, hard = 0) inodes in use: 6, limits (soft = 0, hard = 0) |
The edquota program has a special option -p that assign quotas for groups of users with the same value assigned to an initial user. Assuming that you want to assign users starting at UID 500 on the system the same value as the user wahib, we would first edit and set wahib's quota information, then execute: To assign quota for group of users with the same value, use the following command:
[root@deep] /# edquota -p wahib `awk -F: '$3 > 499 {print $1}' /etc/passwd` |
Further documentation for more details, please consult man pages:
- edit user quotas
- display disk usage and limits
- scan a file system for disk usages
- manipulate disk quotas
- turn file system quotas on and off
- summarize quotas for a file system
- implement quotas on remote machines