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
A seasoned Senior Solutions Architect with 20 years of experience in technology design and implementation. Renowned for innovative solutions and strategic insights, he excels in driving complex projects to success. Outside work, he is a passionate fisherman and fish keeper, specializing in planted tanks.
Much better:
du -dh | sort -n
Eliminates numbering the kilos and jokes like: Regular people believe that the kilobyte has 1000 bytes, the programmer KNOWS that the kilometer has 1024 meters.