2009年10月11日 星期日

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

沒有留言:

wibiya widget