Home » Questions » Computers [ Ask a new question ]

how can I determine how many inodes a directory uses?

how can I determine how many inodes a directory uses?

We're running into an inode limit on our fileserver and I'm doing an experiment to reduce the number of inodes. How can I find out how many inodes a directory uses? I read that the linux kernel doesn't create an inode for soft-links under 60 bytes, but instead stores that symbolic link in the directory inode itself. Thus, I'm trying to shorten the length of the symbolic links to under 60 bytes and then see if this reduces the inode count.

Asked by: Guest | Views: 270
Total answers/comments: 1
Guest [Entry]

"An inode for each file and directory, that's the rule. And about the part where symbolic links less than 60 bytes are stored in the directory inode itself... I believe that's wrong too.

Essentially, when a symlink is less than 60 bytes long, it is actually stored in its own inode (that is separate from the directory inode), and a data block is not created. Thus, it speeds up reading of symlinks less than 60 bytes since a data block does not have to be read, resulting in faster operations."