This command will list out the top biggest files or directories on the server.

resize; clear; date; echo "Largest Directories:"; du -hcx / | grep '^[0-9]*G'\
| sort -nr | head; echo ""; echo "Largest Files:"; nice -n 19 find / -mount \
-type f -ls|sort -rnk7 |head -10|awk '{printf "%d MB\t%s\n",($7/1024)/1024,$NF}'

Leave a Comment

Your email address will not be published. Required fields are marked *