Inode Usage
An inode is a data structure used to keep information about a file on your hosting account. The number of inodes indicates the number of files and folders you have. This includes everything on your account: emails, files, folders, and anything you store on the server.
Here are the topics we will discuss in this article:
- How can I see how many inodes I am using? ⤵
- How can I reduce my inode count? ⤵
- All accounts with SSH access ⤵
How can I see how many inodes I am using?
How you find your inodes will depend on the type of hosting you have.
Shared hosting package
Shared hosting customers can find their account's inode count under the Statistics section on the right-hand side of the cPanel, namely File Usage. The numbers found under the File Usage section refer to the disk inodes, which are the number of files uploaded to an account.
You can go to cPanel's File Manager to look at the files you currently have in your account. Please visit the following article to learn how to access and manage files in the File Manager.
While the File Usage section does not show which directory or folder uses more space in the account, you can still monitor your account's available space using cPanel's Disk Usage functionality.
The Disk Usage interface shows what files and directories consume large amounts of hard disk space in Shared hosting accounts. This section helps in managing the account's disk space quota as it displays the following details:
- Files that your home directory contains.
- Files that exist in hidden subdirectories.
- Mailing lists that Mailman manages.
- Files that your home directory does not contain
To locate the Disk Usage functionality:
- Log in to cPanel.
- Under the Files section, click the Disk Usage icon.
-
On the next page, you will find the file location with Size and Disk usage listed.
- Scroll down at the bottom, and you'll find how much space the directories' contents use. Please note that files typically occupy more disk space than their actual size, and you may find these slight differences when you check your files within the File Manager versus what you see in this section.
You will be given the option to sort the directories by Name or Disk Usage by clicking the radio buttons.
You will be given the option to sort the directories by Name or Disk Usage by clicking the radio buttons.
VPS and Dedicated hosting packages
VPS customers can view their inodes via the Terminal.
- Log in to WHM.
- Using the search boxes either on the left-side panel or at the top of the page, search for Terminal.
- In the terminal, run the command:
df -i.
- The result will show the Inodes on your server.
You can also check your inodes usage via WHM's Terminal using the 'quota' command.
- In the WHM's Terminal, run the command:
quota -s <cpanel username>
. - The result will show the inodes on your server.
How can I reduce my inode count?
Simply delete any files or emails you no longer need. Please visit the following article for instructions on how to delete files in your File Manager.
All accounts with SSH access
Shared, VPS, and Dedicated hosting plans all have SSH by default. Using SSH, you can check the inodes of an account by using the following command:
quota -s <cpanel username>
Users with root access may use the above command to check the inodes of any account on their server, and all other users will only be able to check their own usernames.
You can view the specific folder's inode count by using the command:
echo "Detailed Inode 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 may look messy; however, the output shows a nicely formatted list of detailed inode counts on your account.