6.3.6 Determining which folder takes up space or i-node

By connecting via SSH you can check how much space is occupied in percentage with the command:

  1. df -h

The following command will show how much space the folders in the root take up:

  1. du --max-depth=1 -h /

The following command will show how many i-nodes (small files) are occupied as a percentage:

  1. df -i

The following command will return the folders that contain the most files with sorting and number of files:

  1. find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n

The following command will output the sum of inodes with attachments of the specified folder:

  1. find /var/www/user/data -type f | wc -l

The following arguments are supported:

  • -user user will print the number of inodes of the user user
  • -group group will print the number of inodes of the group