Articles on: cPanel Tutorial

How to Check the Number of Inodes in cPanel

This tutorial will teach us about inodes and how to check the number of inodes via your cPanel.

What is an “inode”?

In simple words, each inode usually equals one file, folder, email, or Unix object in a file system. The number of inodes on your account equals the number of files and folders you have on it.

We have a set inodes limit for our shared hosting services to maintain the best performance for our file system.

How to check the number of inodes



1) Log into cPanel

2) To see the general Inodes Usage, move to the Statistics section on your right-hand side:



3) If you wish to see detailed statistics, you need access using terminal. Search terminal in cpanel.

Please contact support if terminal not appear in your cpanel.


4) To get a list of the inodes usage for every directory in the directory you are currently in, execute the following command:

echo "Detailed Inodes usage for: $(pwd)" ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l) ; printf "$c\t\t- $d\n" ; done ; printf "Total: \t\t$(find $(pwd) | wc -l)\n"

This command will display the number of inodes in the left column and the corresponding folder on the right, as in the example below:

Detailed Inodes usage for: /home/username 

139             - .cagefs
19721           - example-domain.com
17274           - example.com


How to reduce the inodes usage



1) Delete Unnecessary Files And Folders

Based on your inodes usage audit, consider removing unnecessary files and folders. For example, if a specific file or folder stores old backups or is created for testing or staging purposes, you may remove it or download it locally via FTP.

2) Clear Old And Spam Emails

If the inodes usage is related to the mail folder, you have a high number of emails. So, in this case, removing old emails will help decrease the inodes usage. If you are using cPanel as the control panel, you can take advantage of the Email Disk Usage feature, which will help remove emails based on specific criteria. If you prefer to do it manually, you can do so from your Webmail or preferred mail client.

3) Clear The Cache Files

Major CMS, such as WordPress, Joomla, etc., use a caching system that may create cache files. So it’s recommended to keep an eye on the cache folders and to clear/purge the cache from time to time.

Updated on: 02/12/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!