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:
- df -h
The following command will show how much space the folders in the root take up:
- du --max-depth=1 -h /
The following command will show how many i-nodes (small files) are occupied as a percentage:
- df -i
The following command will return the folders that contain the most files with sorting and number of files:
- 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:
- 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