humanize-bytes

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2021 License: MIT

README

humanize-bytes -- Utilities to convert "MiB" etc to raw numbers

Install with

go get github.com/tv42/humanize-bytes/cmd/bytes2human github.com/tv42/humanize-bytes/cmd/human2bytes

Use like this:

$ human2bytes 42GiB
45097156608

$ human2bytes 42GB
42000000000

For example, sort your du, but still get readable results:

$ du -b * | sort -nr | head -5 | bytes2human

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL