如何查看剩余磁盘配额?

Lot*_*har 31 hard-drive quota

df 只报告磁盘可用空间。如何获得允许的可用空间?

KPW*_*INC 34

看看这里的配额命令:

http://linux.die.net/man/1/quota


配额

例如:

配额 -u 用户 1

系统响应:

Disk quotas for user user1 (uid 501):
     Filesystem  blocks   quota   limit   grace files   quota   limit  grace    
     /dev/hda6     992   50000   55000              71   10000   11000
Run Code Online (Sandbox Code Playgroud)

配额报告

报告超出配额限制的所有用户:

配额 -q

配额总结报告:

代表配额 -a

Report for user quotas on device /dev/hda5
Block grace time: 7days; Inode grace time: 7days
                    Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      -- 4335200       0       0         181502     0     0
bin       --   15644       0       0            101     0     0
...
user1     --    1944       0       0            120     0     0    
Run Code Online (Sandbox Code Playgroud)

此用户未显示任何限制,因为限制设置为 0。


hay*_*lci 7

如果设置了配额,“quota”命令会显示详细信息。

quota -v
Run Code Online (Sandbox Code Playgroud)

  • `quota` 命令通过 SSH 不会返回任何内容。是不是说没有设置? (6认同)