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.

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.