Post #2419282
2026-04-25 15:37 UTC
Useful Mac/Unix/Linux terminal command for listing a directory by size (incl. subdirs):
du -h -d 1 <DIR> | sort --sort=human-numeric
This will list every file/dir in <DIR> with its total size, with the biggest items sorted last (where you don’t have to scroll to see them).
Replies (2)
-
@radex@social.hackerspace.pl 2026-04-25 15:42
@ole@chaos.social yes, works with GNU coreutils too
-
@lembacon@mastodon.social 2026-04-25 15:52
@ole@chaos.social dust is also a great alternative to this, faster and with colored output https://github.com/bootandy/dust