Recently I had to fix a linux system whose root file system was allowed to fill up. Not having much knowledge of the system, I needed a quick way to find out which files were consuming the most space to see if any of those could be purged. The likely culprit was some huge log files, but how to find them?
du and sort to the rescue!
This simple command dumped out the sizes of all files on the system:
du -x / | sort -rn | more
Let’s pick it apart: