List the current folder folder's sizes with the terminal?

Solution 1:

If you want to show all the directories in the current directory:

$ du -sh */
788K    foo/
500K    bar/
931K    baz/

To show them starting from another directory:

$ du -sh /path/to/dir/*/
48K     /path/to/dir/dir1/
4.0K    /path/to/dir/dir2/
6.7M    /path/to/dir/dir3/
20K     /path/to/dir/dir4/
8.0K    /path/to/dir/dir5/
44K     /path/to/dir/dir6/

If you want to make sure directories with names starting with a dot are included do shopt -s dotglob first.

Solution 2:

On a Mac, the --max-depth option is supplanted by -d [depth]. So, to see a human readable listing of your root drive plus 2 levels deep use the following:

du -hd 2 /* 

Note: this command will expose the top two directory levels off your root. This includes traversing one level into your Volumes, and will list the summary sizes of each top-level directory in each of your attached volumes. Depending on what you have attached, this command could take some time to complete.

Solution 3:

Another aproach is the --max-depth option.

du -h --max-depth=1 .

Will list all directories and files under the current folder with size.

Depth 2 would list one more level of folders.

Solution 4:

Try:

$ du -s ./f1

or

$ du -sh ./f1

for more friendly readable sizes.