Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a System: Managing Disks and Files
Managing File Systems
Chapter 6622
In this example, /dev/null specifies that the file created is empty,
/home/quotas specifies that the file quotas is to be in /home directory,
and 600 root bin is the mode, owner, and group of the file. For syntax,
see cpset (1M).
NOTE To control the size of the quotas file, refrain from using large user
identification numbers (UIDs). This will not be a concern if you use SAM
to add users because SAM selects the UIDs in numerical order.
Step 3. Set the user quotas.
Use the /usr/sbin/edquota command to set or subsequently modify
quotas of individual users. The edquota utility creates a temporary file
for a text representation of disk quotas for a user and invokes an editor.
Once you enter the quotas and leave the editor, the text is converted to
binary form for storing within the quotas file. For syntax, see edquota
(1M).
To set uniform limits for users in a file system, create limits for one or
more initial users, then apply those limits to the remaining users. For
example, the following shows how to assign limits for a typical user
whose home directory is within the file system /home and then
implement those limits to other users. For this example, assume these
limits: a soft limit of 10,000 blocks, a hard limit of 12,000 blocks, a soft
limit of 250 files, and a hard limit of 300 files.
a. Set the limits for a prototype user, patrick.
i. Invoke the quota editor:
edquota patrick
ii. To input the disk-usage limits, type the following:
fs /home blocks (soft = 10000, hard = 12000) \
inodes (soft = 250, hard = 300)
There must be one such line for every file system with a quotas
file. Be sure to type the line exactly as shown in order to get the
correct spacing between items. Bad formatting and/or
typographical errors may cause incorrect setting of quotas.
iii. Save the file. This updates the quotas file. Exit the editor.