CityHost.UA
Help and support

How to check occupied space and number of inodes using SSH?

To check and control the used disk space of your hosting account, you need to connect to the server via SSH.

You can find connection instructions in the [WORKING WITH SSH] section .

— In order to find out the total volume of each specific site in the WWW directory (how much space is occupied by an individual site) , execute the command:

 du -sm $HOME/www/* | sort -n | awk '{print $1 " MB" " => " $2}' | sed 's|'$HOME/www/'||g'

In order to find out the total volume of all nested folders of a particular site (how much space is occupied by each separate directory of a particular site) , execute the command:

 du -sm $HOME/www/SITE_NAME/* | sort -n | awk '{print $1 " MB" " => " $2}' | sed 's|'$HOME/www/'||g'
instead of SITE_NAME, use the full name of your site, for example - cityhost.ua

— In order to find out which site occupies the most inode , execute the command:

 cd $HOME/www/ && find ./ | cut -d '/' -f 2 | grep -v '^$' | sort | uniq -c | sort -n

— In order to find out the total number of inodes used by all directories of your sites , execute the command:

 cd $HOME/www/ && find ./ | cut -d '/' -f 2 | grep -v '^$' | wc -l