Here’s how to get the size of a directory.

<pre lang="bash">du -sh /var/www

Output:

<pre lang="bash">2.1GB    /var/www

Size of the directories and files one level down.

<pre lang="bash">du -sh /var/www/*

Sort with biggest files from top to bottom.

<pre lang="bash">du -sh /var/www/* | sort -rh

Top 5 biggest files from top to bottom.

<pre lang="bash">du -sh /var/www/* | sort -rh | head -5