du - estimate and summarize file and directory space usage on Linux

Originally published at: du - estimate and summarize file and directory space usage on Linux

This du command guide is a follow-up of my previous 90 Linux Commands frequently used by Linux Sysadmins article. Every week, or as time allows, I will publish articles on the ~ 90 commands geared toward Linux sysadmins and Linux power users. Let’s continue this series with the du command. du (disk usage) command is a…

I think, du command makes more sense when used with sort command. I generally use it like that:

du -had 1 | sort -hr

or in long written form;

du --human-readable --all --max-depth=1 | sort --human-numeric-sort --reverse

2 Likes

Thanks for the tip. As you know, we can shorten it to du-sort:
alias du-sort='du -had 1 | sort -hr'

And also consider ncdu and gdu.

2 Likes

Don’t forget duc: https://duc.zevv.nl/

sudo apt install duc

2 Likes