How to find inode usage

Basically, an inode is used to identify each file on the filesystem. So running out of inodes generally means you’ve got a lot of small files laying around. Below you can find some commands to identify  what directory has a large number of files in it.

df -i

This list inode usage of all partitions monted.

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

This command will help you to identify what directory under “/” has a large number of files.

 

Leave a Reply

Your email address will not be published. Required fields are marked *