Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it simply because going from filenames to inode numbers is difficult in userspace, and you can't read inodes from there?

share|improve this question

migrated from Dec 15 '11 at 7:37

This question came from our site for professional and enthusiast programmers.

The answer is twofold, I think. It's not available in general because, as suggested, a normal user can't go reading inodes arbitrarily. It's not available as a tool requiring root access because there's no easy, reliable way to go from filenames to inode numbers outside the kernel. – nick black Dec 14 '11 at 9:03
Better off on – Chris J Dec 14 '11 at 9:04

GNU coreutils' implementation of du(1) will support the --inodes option with the next release (>8.21) ... I've just pushed the patch to upstream Git ( See

share|improve this answer

Use df, not du!

du stands for "disk usage". It is df which stands for "disk free" and will check the filesystem proper. Including inode usage with the -i option!

Otherwise, just do:

find thedirectory -exec ls -di {} \;|awk '{print $1}'|sort|uniq|wc -c

or similar

share|improve this answer
No, I want a hierarchal summary of the inode usage from a given root. I know what tool I'm talking about. – nick black Dec 14 '11 at 9:00
but why, why do you think he wants to measure file system disk space usage? – Oleg Mikheev Dec 14 '11 at 9:02
find|wc -l, then... Of course you'll need to account for files with multiple links. But your question doesn't really make any sense. – fge Dec 14 '11 at 9:03
@Oleg, I didn't say this at all. df has a -i option. – fge Dec 14 '11 at 9:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.