Created
August 9, 2023 13:10
-
-
Save kevinsimper/23586070315a80dd97d5460fea4e0e25 to your computer and use it in GitHub Desktop.
Humanize bytes on Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First install GNU CoreUtils | |
$ brew install coreutils | |
# pass bytes to numfmt | |
$ numfmt --to=iec-i --suffix=B --format="%9.2f" 3168122 | |
3.03MiB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment