日期:2014-05-16 浏览次数:20762 次
# !/bin/bash # Program: # This program is used to create account environment for "quota" # History: # 2013/2/5 on_1y First release PATH=$PATH export PATH # create a group,put the accounts which is need to be "quota" in it groupadd myquotagrp for username in minix01 minix02 minix03 do useradd -g myquotagrp $username echo "password:" | passwd --stdin $username done exit 0
$ df -h /home Filesystem Size Used Avail Use% Mounted on /dev/sda10 94G 37G 53G 41% /home $ mount | grep home /dev/sda10 on /home type ext4 (rw)
注意不能对目录进入磁盘配额,要对文件系统,所以如果想对home进行磁盘配额,home 需要是一个独立的文件系统,如果不是,那么只能对/进行磁盘配额
另外,VFAT文件系统不支持磁盘配额,所以还需要用mount查看一下文件系统类型
/home ext4 defaults,usrquota,grpquota
然后重新挂载/home
# umount /home # mount -a # mount | grep home # /dev/sda10 on /home type ext4 (rw,usrquota,grpquota)