How To Count Inodes For Each Directory

Hostgator whom this website is hosted with limits you to 50,00o inodes per account.  So it not unlimited as they claim but nonetheless its pretty good hosting ..

Here is a script that I wrote which helps you count each inodes in a directory

#!/bin/bash
# count inodes for each directory
LIST=`ls`
for i in $LIST; do
echo $i
find $i -printf "%i\n" | sort -u | wc -l
done

Also this line seems good for figuring out which directory is using up the most space

du -ks ./* | sort -n
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Technorati
fields marshall Fields Marshall is a web developer and Google Adwords professional located in Pucon Chile.

If you found this article helpful, please consider linking to it it or sharing it with someone else.

Any comments ? Please leave them below.

Related Articles

Leave a Comment