Thursday, 24 October 2013

Finding the Inode usage of a Cpanel account 


Go to /home/username and execute the following command :

---------------------------------------------------------------------------------------------------------------------------
echo "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"
-------------------------------------------------------------------------------------------------------------------------------

Sample output
=================

root@server [~]# cd ~chereenm/

root@server [/home/chereenm]# echo "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"

Inode usage for: /home/chereenm
12 - .cagefs
 1 - .cagefs.cron
1 - .cagefs.screen
 2 - .cagefs.tmp
2 - .cl.selector
2 - .cpaddons
 40 - .cpanel
17 - etc
1 - .htpasswds
401 - mail
3 - .mozilla
2 - public_ftp
182 - public_html
3 - .spamassassin
190 - tmp
Total: 871

root@server [/home/chereenm]#
-------------------------------------------------------------------

No comments:

Post a Comment