To view the amount of disk space used, run the following command in the SSH console:
quota -s
virt490:sn-69-1.tll07.zoneas.eu:~> quota Disk quotas for user virt490 (uid 10490): Filesystem blocks quota limit grace files quota limit grace /dev/sdb1 41561M 512G 512G 169k 512k 512k
The displayed output will show the following information:
- “Filesystem” is the filesystem in which the quota is implemented.
- “Blocks” is used hard disk space in megabytes (example: 41561M = 41.5GB).
- “Quota” and “limit” are applied hard disk capacity limits in gigabytes (512G).
- “Grace” is not used.
- “Files” number shows the total amount of files (inodes: 169k = 169,000)
- “Quota” and “limit” show the inode limit (example: 512k = 512,000 limit)
To see which directory takes up the most space, use:
du -h | sort -hr | head -50
To get the overview which directory has the most inodes, use the next command (if the inodes usage limit is exceeded and the command returns an error, omit the sort part from the end of the command):
find . -maxdepth 1 -type d -print0 | while read -d '' -r dir; do num=$(find $dir -ls | wc -l); [ "$dir" = "." ] && printf "%5d files in directory %s\n" "$num" "$(pwd)" || printf "%5d %s\n" "$num" "$dir"; done 2>/dev/null | sort -nr
If you also want to see the number of files in deeper directories, use:
find | cut -d/ -f 2-5 | sort | uniq -c | sort -n | tail -50