
eza: How to Show File Sizes
Updated
Learn how to display, format, sort, and calculate folder sizes with eza.

Before we start, make sure you have eza installed on your Mac. If you need it, install it with Homebrew:
brew install eza
Show Human-Readable File Sizes
Open your terminal, navigate to your folder, and run eza with the -l flag. Unlike ls, eza already displays human-readable decimal sizes (k, M, G) by default, while -h adds column headers at the top of the table:
eza -lh
Change Size Units and Sort
All size formatting flags pair with -l. Use -lb for binary prefixes (Ki, Mi, Gi in powers of 1024), -lB for exact byte counts, or -lS to include the actual disk block size allocated on your filesystem. To put the largest files at the top, combine --sort=size with --reverse:
eza -l --sort=size --reverse
You can also add --color-scale=size to shade file sizes along a color gradient so huge files stand out immediately.
By default, directories show - in the size column. On macOS and Linux, add --total-size (like eza -lh --total-size) to recursively calculate and display the total size of every folder.
