Counting Inode usage on a directory

See the script below. Really useful if you are running out of inodes.

#!/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


Comments are closed.