歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 教你做linux磁盤配額quota

教你做linux磁盤配額quota

日期:2017/2/28 17:35:11   编辑:Linux教程
下面的例如都是以/home這個目錄為主的!

<!--[if !supportLists]-->1. <!--[endif]-->使用quotaon –vaug 命令開啟quota功能。

v ---詳細信息顯示。

a ---所有組和用戶。

u ---只針對用戶。

g ---只針對組。

<!--[if !supportLists]-->2. <!--[endif]-->從新掛載。

例如:

[root@localhost ~]# mount -o remount,usrquota,grpquota /home

<!--[if !supportLists]-->3. <!--[endif]-->quotacheck -cmug 掛載點

<!--[if !supportLists]-->4. <!--[endif]-->使用setquota命令的g或者u參數,默認是對u也就是對用戶設置配額。

例如:

[root@localhost ~]# setquota yy 1024 2048 10 20 /home

yy ――用戶名。

<!--[if !supportLists]-->1024 <!--[endif]-->――空間大小的軟限制。

<!--[if !supportLists]-->2048 <!--[endif]-->――空間大小的硬限制。

<!--[if !supportLists]-->10 <!--[endif]-->――文件數量的軟限制。

<!--[if !supportLists]-->20 <!--[endif]--> -―文件數量的硬限制。

5.注意!如果對組進行限制的話,軟硬限制是所用組內用戶的空間或文件數的總和!

repquota -a -----查看用戶的使用情況!

quotaoff -a 關閉quota功能!

別的不管在quota世界裡一個block是1k !!!!!

edquota -t 修改軟限制的過期時間。
Copyright © Linux教程網 All Rights Reserved