Every now and then one of my servers will stop working because the hard drive or one of its partitions has filled up. In almost every case it has simply been choking on a log file that grew to massive proportions, but not always.
There are a lot of linux commands that will help you track down what’s using up all your memory. However I found that they often left me just as puzzled afterwards. Here’s a handy one that will show you the space being used by every folder or file in the current directory and most importantly they will be sorted by size.
du -sk * | sort -n