The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #10 (permalink)  
Old 01-06-2008
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,245
It's pretty easy to do:

Example: the home directories are in a filesystem mount on /export
username is (any) one of the users.


Code:
touch /export/quotas
quotaon /export

get the block size

Code:
# df -g /export
/export            (/dev/dsk/c2t0d0s6 ):         8192 block size          1024 frag size  
1404412410 total blocks 1362535582 free blocks 1348491458 available       84482944 total files
84285845 free files      8388734 filesys id  
     ufs fstype       0x00000004 flag             255 filename length

Block size is 8k

I want to set a quota of 100MB so:
100 * 1024 * 1024 / 8192 = 12800 blocks


Code:
# edquota username

Set the quota for username ( in this case I am setting soft and hard limits the same )

Code:
fs /export blocks (soft = 12800, hard = 12800) inodes (soft = 0, hard = 0)

Save and quit.
Apply the same quota of the remaning users:


Code:
edquota -p username username2 username3 ...

Where username2 username3 ... is the rest of the list of users