Wednesday, 21 October 2009

Linux - Disk usage

The amount of times I have to Google for the Linux command to calculate the amount of disk-free space from the present working directory, I decided to blog it so others can share in it too!

Simply type

du -ks directory

Where du = Directory Usage
-k = Use units of kb (1024 bytes) for size
s = Display summary only
directory = Is the directory to start reporting sizes, or if not provided it defaults to the current directory.