How to get folder sizes in Ubuntu

To get the foldersizes in Ubuntu do the following:

du -h --max-depth=1 | sort -r -k1,1n

or:

sudo du -h -d 1 . | sort -r -k1,1n

in MacOs on the Apple iMac or Macbook

Last update: Fri, 05 Apr 2024 14:18:17