Quantcast
Viewing all articles
Browse latest Browse all 21

Answer by Most Wanted for A standard tool to convert a byte-count into human KiB MiB etc; like du, ls1

pip install humanfriendly and then add a simple function to your default shell (e.g. ~/.bashrc)

function fsize() { humanfriendly --format-size `stat -f '%z' $1` }

Use like this

➜ fsize file.txt
6.17 KB

Viewing all articles
Browse latest Browse all 21

Trending Articles