Borys Bradel's Blog

Measuring space left and used in unix

Tags: linux April 12, 2009    

A very handy command to use to find out how much space is left on a device is to use the command df -h /device (e.g. df -h /local or df -h /home). If a directory is specified then the info for whatever device the directory is on is shown.

Conversely, the du command is a very nice command to find out how much space is used by a directory tree. To control the amount of output, the --max-depth command needs to be used. The most useful output is probably from the du -k --max-depth=1 command (the k is for outputing size in 1k increments).

Copyright © 2009 Borys Bradel. All rights reserved. This post is only my possibly incorrect opinion.

Previous Next