Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How many inodes you have in a directory?  (Read 2220 times)

0 Members and 1 Guest are viewing this topic.

vinayakk

  • Guest
How many inodes you have in a directory?
« on: March 18, 2014, 06:48:01 am »
Here’s a great one-liner for finding out how many inodes you have in a directory:

echo "Detailed Inode usage for: $(pwd)" ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do  c=$(find $d |wc -l) ; printf "$c\t\t- $d\n" ; done ; printf "Total: \t\t$(find $(pwd) | wc -l)\n"

 :)  ;)