On 09/16/2010 05:59 AM, Petr Pisar wrote:
Hello,
I found `df' utility from coreutils-8.5 does not describe `-m' option that is
mentioned in info page and the program accepts it.
Thanks for the report. However, 'df -m' is currently marked obsolescent
in the code, which explains why it is undocumented (as it may disappear
in the future); and I don't see it listed in the info page (could your
info pages be out of date, from an older coreutils version?). And while
-k is required by POSIX, I know of no standard for -m, and also note
that neither BSD nor Solaris implementations provide -m.
The main reason that it was marked obsolescent is that it a synonym for
the long option '--megabytes'. However, that option actually reports on
mebibytes (1024*1024) rather than megabytes (1000 * 1000).
Additionally, since disk manufacturers these days tend to tell you disk
size in megabytes (or gigabytes) rather than mebibytes (or gibibytes),
some people actually prefer to see disk free space reported in the same
units. And looking through history, coreutils already removed 'du
--megabytes' in 6.9.90, but at that time, 'du -m' issued a warning while
'df -m' was silent, which explains why it was not outright removed from df.
Really, what needs to happen is a deprecation warning if -m is used, so
that you know that we plan on removing it just like we did for du.
And in the meantime, the portable and documented way to get what you
want is to do 'df --block-size=M', or 'export DF_BLOCK_SIZE=M' into your
environment.
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org