how to find the no of inodes used on a specific folder
it is very easy to count the no of inodes used folder wise using the below command.
root@earn # 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"
This command in plan text below just copy and paste in on the specific folder
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"
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”
You will get the result as below.
root@earn # 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" Detailed Inode usage for: /home/icsbhdio 11 - .cagefs 2 - .cl.selector 73 - .cpanel 1 - etc 1 - .htpasswds 3 - logs 16 - mail 2 - public_ftp 58 - public_html 4 - .softaculous 6 - ssl 37 - tmp 1 - .trash Total: 224