How does `-h` in `ls -lah` work in Unix? How does `-h` in `ls -lah` work in Unix? unix unix

How does `-h` in `ls -lah` work in Unix?


They're not "so different". -h is "human readable":

30777650366 -> 30056299K -> 29351M -> 28G for powers of 230777650366 -> 30777650K -> 30056M -> 30G for powers of 10

If you'd RTFM'd (man ls):

  -h, --human-readable         with -l and/or -s, print human readable sizes (e.g., 1K 234M 2G)  --si   likewise, but use powers of 1000 not 1024