DU: HOW TO SEE THE DIRECTORIES THAT TAKE UP THE MOST SPACE


A command that I use a lot to see the space occupied by files and directories is the "du" command.
By setting some parameters it is very convenient to use:

du -sm * | sort -nr | head -5


Head -5 is to return only the first 5 results, you can change it to for example 10 if you want to see more results.
sort -nr is for sorting from heaviest to lightest. So if we use it together with "head -5" we get the 5 things that weigh more.

Tags

Have Any Project in Mind?

If you want to do something in Drupal maybe you can hire me.

Either for consulting, development or maintenance of Drupal websites.