https://github.com/tv42/humanize-bytes
Command-line utilities to convert "MiB" etc to raw numbers, and back
https://github.com/tv42/humanize-bytes
humanize
Last synced: 11 months ago
JSON representation
Command-line utilities to convert "MiB" etc to raw numbers, and back
- Host: GitHub
- URL: https://github.com/tv42/humanize-bytes
- Owner: tv42
- License: mit
- Created: 2012-12-06T02:45:27.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2021-05-05T16:45:02.000Z (about 5 years ago)
- Last Synced: 2025-04-13T20:52:10.627Z (about 1 year ago)
- Topics: humanize
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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