How does one list all directories, and see the space each directory takes up on your disk, in a given directory?
I rarely need this, but I do find myself having to Google it each time I do ...
So for my own reference, and maybe for others as well:
(works in a Linux Shell or macOS Terminal)
du -sh /path/to/directory/*
This will list all directory in "/path/to/directory/", with it's size.
~ $ du -sh /Users/username/* 12:25
1.3M /Users/username/Applications (Parallels)
24M /Users/username/Creative Cloud Files
12K /Users/username/Fusion 360
1.3M /Users/username/untitled folder
"du" (disk usage) command estimates the space usage. Note: only for directories you have access to!!!
The Linux Man page and Apple man page can give you more details.
The options we use here: -sh
-s, --summarize; display only a total for each argument
-h, --human-readable; print sizes in human readable format (e.g., 1K 234M 2G)
-c, --total; produce a grand total