HomeFreeBSD

ls -lh: humanize the total

Description

ls -lh: humanize the total

Before this change, the total printed on the first line was always in
blocks.

Now the long format with -h will print the "humanized number" instead.

ls -sh never provided sizes in anything other than blocks, total or
individual, and this commit doesn't change that.

The total number of blocks is a sum of fts_statp->st_blocks, so it's
multiplied by 512 and not by blocksize.

$ ls -lh /usr/bin | head -n 2
total 442 MB
-r-xr-xr-x 1 root wheel 70B Dec 20 21:06 CC

Differential Revision: https://reviews.freebsd.org/D48329

Details

Provenance
pstefAuthored on Mon, Jan 6, 5:59 PM
Differential Revision
D48329: ls -h: humanize the total as well
Parents
rGe2012b81cb87: BUS_CONFIG_INTR.9: Describe bus_config_intr() wrapper function
Branches
Unknown
Tags
Unknown