An inode is a data structure that stores information about all files created on a hosting account. The number of inodes indicates the number of files, folders, emails, or anything stored on a web hosting account.
Each file on your web hosting account is identified by an inode number in the file system. Additionally, inodes store essential data about files, such as user, group ownership, access mode, and file type.
Check directly from cPanel
1. Log in directly from the cPanel account.
2. Inside the Statistics option, you can get the Inode Value from the File Usage Option.
Check from SSH Login
1. Log in to the server using the SSH command.
2. Ensure that you are in the home directory with the following command.
3. Use find command:
Following is the command to check the total inodes on your server.
4. Use find . -printf command
Execute the following command if you are looking to view the inode values directory-wise. You can use sort command to display the files alphabetically.
5. Use df command:
The amount of inodes utilised and available, together with disc space use statistics for all mounted filesystems, are displayed by this command.
For instance: When you type df -i into the terminal, the following information will appear:
The percentage of utilised inodes is shown in the "IUse%" column. Larger percentages indicate folders containing plenty of files.
df command syntax:
→ To check inode usage in a filesystem using the df command:
5. Use du command:
The disc utilisation of files and directories is calculated by this command. We can determine which folders have the most files by combining it with sorting and output limitation.
To show the top 10 directories sorted in decreasing order by size, run du -a | sort -n -r | head -n 10.
6. Use ls command:
An explanation of the ls -lai command's output is that it lists files ordered by inode numbers.
An example of how to display a list of files and directories with their inode numbers is to run ls -lai /path/to/directory.
7. Use ncdu command:
ncdu is a text-based disc utilisation analyzer. It offers a view of disc consumption that is hierarchical and includes inode usage.
To analyse disc utilisation, run ncdu /path/to/directory after installing ncdu (sudo apt install ncdu)..
8. Use stat command:
The stat command shows the status of a file or filesystem. We may examine files in a directory by printing filenames and inode numbers.
For instance: In a directory, running stat -c "%i %n" * will show the filenames and inode numbers for each file.