mgeorge wrote:
Being relatively new to some aspects of Linux, what is the easiest way to determine what areas of my filesystem are taking up the most space?
I do the following, as root:
Code:
du / 2>&1 | tee /tmp/du.out
That command writes an entry for every directory on the filesystem indicating its size (in kilobytes). Then I view the results with:
Code:
sort -nr /tmp/du.out | less
This sorts the list so that the "biggest" directories are show first. Note that the size indicates the size of the directory
and all of its subdirectories. So a big /usr doesn't necessary mean that much, you have to drill down a little bit to figure out what directories are really using the most space unnecessarily.