Disk space commands

Ever needed to check which folders on your server are using up your disk space? Here's a few commands that you can execute to get that information.

his would give you your entire partition usage per fstab

df -h
To calculate the directory size of the current directory you're in, execute:
du -sh
You can show the sizes of the subdirectories (only first level) within the directory you are in by executing:
du -sh *
To calculate the directory sizes of the first level of subdirectories in any folder, you could execute:
du -sh /home/*
And to show the size of any directory you would execute:
du -sh /home

Right, now take note it could take a little while to calculate if you're trying to calculate gigabytes as gigabytes normally means lots of folders and files.



SOCIAL BOOKMARK - Posted by Steven Sullivan on 1st November, 2007 - 15:25:11 GMT

Comments

There are no comments. Why not be the first to comment?

* Name:
* E-Mail:
Not shown to public
Website:
Emotions:
* Comment:

Up

Down

characters left
* Security Code:
Type this code in the box: 586647
* Required field
© Steven Sullivan 2006 - All Rights Reserved         Video Disclaimer - Valid XHTML & CSS