Disk space

If you have run out of disk space and you need to find what folder or directory is taking up an abnormal amount of space use the following command at the root level.

du -ms *

This command gives you the size of each file (in megabytes) housed in your current directory. Change directories into any directory that seems oversized and continue to do this until you have reached what you think may be the culprit.

At this point you will need a bit more detail of what file or folder is oversized so use the following command

du -h

This lists every directory recursively from where you are and prints its size to the screen. It is very detailed and verbose.

If the list is too detailed or you need to look through the list item by item you can always use

> filename.txt

after the command and then read or print out the contents of filename.txt that you have just created.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s