Member Avatar for polygon
polygon

Dear Folks,

Using bash on Linux, how would I list file sizes to 3 significant figures in human-friendly form?

If I try

ls -lh

I get 2 significant figures, but I would like to get 3 significant figures.

Also, there is the almighty muddle between megabytes and mebibytes that leads to confusion about what is being really output, but I am happy with either version so long as I get three sig figs and know whether it is mega or mebi :-)

TIA.

P.S. Apologies for cross-posting. Originally posted at http://www.daniweb.com/forums/post1322780.html#post1322780 and re-posted here in the hope of a better repsonse.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.