Quick note to self.

The root partition on our servers at Robin Systems is restricted to 50G or 100G, mostly to ensure that we do not abuse it for caching or for storage of product artifacts. This also becomes a forcing function for me to keep my root partition clean and remove any redundant files. Whenever i get the ‘no space on device’ error, the first thing i want to do is to figure out the culprits. This is fairly easy to do:


du -h | sort -hr | head

This will spit out a reverse, sorted list of largest files in a given directory. I have also tried ncdu and i like it, but the above command saves me the trouble of installing new packages.

 

Advertisements