du -chs command
To locate which directories may be using an excessive amount of disk space, you can find them by executing the du -chs command as shown. This will show how much disk space is used by each subdirectory.
Note: Make sure you execute this command as root!
Plesk example# du -chs /var/*
cPanel example# du -chs /home/*
Example:Assume the output of the du command is as shown:
You would quickly notice that /var/www/ is consuming a very large amount of disk space. We can round this down even further by ‘walking’ the command into the www folder by typing:# du -chs /var/www/*
Now you will notice that the 'load' is split by both the /var/www/backup and /var/www/vhosts directories.
Continue this procedure until you have found where your space is being used.
You can use the find command if you know the minimum size files you are looking for.
To search for a file that is at least 100MB, you can use:
find / -size +100M
To search for a file that is at least 1.1GB in size, try:
find / -size +1.1GPosted in
This article has been provided by Codero Hosting, the leading provider of reliable
dedicated, managed and cloud hosting services. Need more information on this
topic or to learn more about Codero’s hosting services please
visit www.codero.com, chat with us online or give us a call at 866-2-CODERO.