We can find the inode usage (Number of files) owned by each user/directory, especially useful in VPS. Each VPS will have inode limits (the maximum number of files that can be created in that VPS)

For example If the inode usage is 100 % then we needs to find out which user/directory has owned the maximum number of files.

Run the following commands

In my case the user mailnull (the system user used by exim to store queued emails) owned maximum number of files as there were around 30000 emails in the mail queue. From the command output shown below the mailnull user has the inode usage of 89971.

After mailnull the next user who has owned maximum number of files is test17 (58163). Now need to find out which directory contains maximum number of files.

( This script will display
the directory/file and count the number of files inside that directory )

Here again public_html directory contains the maximum number of files.

Finally the directory x7 contains the maximum number of files (inodes).

Similarly by using this method we can find out which user/directory owns the maximum number of files in any linux server.

This command might be helpful to you in finding the folder using a great part of the inodes. It outputs the top 5 file system objects utilizing the most inodes in the current folder:

Previous ArticleNext Article

Leave a Reply

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