On 07/18/2013 2:25 am, Bernhard Voelker wrote:

I have e.g. a file system where most of the inodes space is used,
let's say 450k of 500k. What command(s) would I use to find out
which sub-directories are eating most of the inodes?

Well, I could use something like this:

$ find . -xdev -type d
| while read f ; do
printf "%d %s: " "$(find "$f" -xdev | wc -l)" "$f" ;
done
| sort -k1,1n

But this a) is lame and b) doesn't count hardlinks well.

Do we have such a command (option) already?
If not, what about a new du(1) option that reports inodes
instead of blocks/bytes statistics, i.e. "du --inodes"?

Have a nice day,
Berny

It is sometimes hard to find a generic solution to a filesystem specific problem.

Which filesystem are you using?

Joseph D. Wagner

Reply via email to