I am quite confused about the i-nodes. They say delete files to reduce the i-nodes but I have deleted 100s of log files from different cpanels on my server but inode count is still the same.
You can determine the breakdown of your inodes on a given file system using the
You typically call
The above command shows the total number of inodes along with the number available.
You can use the
In general, you're right - if you delete all references to the files (which could be > 0 if the files are hardlinked), the inodes should be freeed up when you delete the files.
However, if some process has the file open (like whatever process is writing to the log files), the inodes won't be freed up until that process(es) closes the files. Just as disk space used by the files isn't freed up until the files are closed.
Before deleting the files, you could have used the lsof command on the files to see if some process had the files open. Now that you've deleted the files, you could still use lsof to look at all open files on the system and search for the files that you've deleted.