This article describes how to determine where your account is using the most disk space.
To maintain the reliability and performance of servers for all users, A2 Hosting monitors disk space usage. If you have a lot of files and directories, though, you may not know where exactly your account is using the most disk space.
To determine your account's disk usage, follow these steps:
Type the following command:
du -sh * | sort -h
This one-line command uses the du command to calculate disk usage statistics for every file and directory in the current directory (in this case, your home directory). It then uses the sort command to sort the data usage statistics, with the smallest files and directories at the top, and the largest files and directories at the bottom. The following example shows typical output from the command:
0 access-logs 0 www 4.0K a2backups 4.0K bin 4.0K perl5 8.0K public_ftp 132K etc 448K php 3.3M tmp 20M mail 87M public_html
To view disk usage for a particular subdirectory, change to the directory (for example, type cd public_html), and then rerun the command in step 3. You can progressively step into subdirectories, run the command, and determine where exactly your account is using the most disk space.
You can add the total amount of disk space usage to the output by using the -c option for the du command. For example:
du -shc * | sort -h
If disk space usage for your account is too high, you should try to determine the cause as soon as possible so you can bring it back down to an acceptable level. Some common causes of high disk usage are:
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.