df does only reports the disk free space. How can I get my allowed free space?
Asked
Active
Viewed 1.4e+01k times
35
-
related: https://serverfault.com/questions/94368/understanding-quota-output – Ciro Santilli OurBigBook.com Apr 03 '19 at 15:10
3 Answers
38
Take a look at the quota command here:
http://linux.die.net/man/1/quota
quota
For example:
quota -u user1
System response:
Disk quotas for user user1 (uid 501):
Filesystem blocks quota limit grace files quota limit grace
/dev/hda6 992 50000 55000 71 10000 11000
quota report
Report on all users over quota limits:
quota -q
Quota summary report:
repquota -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
No limits shown with this user as limits are set to 0.
KPWINC
- 11,274
- 3
- 36
- 44
8
If quotas are set, "quota" command shows the details.
quota -v
hayalci
- 3,611
- 3
- 25
- 37
-
6Nothing returns by `quota` command through SSH. Does it mean it was not set? – Ahmad May 15 '18 at 06:10
-
@Ahmad There can still be a quota system active that doesn't use the interface `quota` is using. (I previously gave the example of cephfs here but I just see that the ceph cluster I've user access to doesn't have the `quota` command installed so it could be simply that.) – Joachim Wagner Feb 24 '20 at 11:13
1
try this command
repquota -sa | grep -v "0 0"
This will give details report for all user-driven accounts like:
/home]# repquota -sa | grep -v "0 0"
*** Report for user quotas on device /dev/root
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
usera -- 20018M 977G 977G 351k 0 0
userb -- 11301M 55000M 55000M 106k 0 0
users -- 35192 1000M 1000M 2092 0 0
Aadi
- 11
- 1