[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7042: df --help does not show `-m' option

From: Eric Blake
Subject: bug#7042: df --help does not show `-m' option
Date: Thu, 16 Sep 2010 11:08:56 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100907 Fedora/3.1.3-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.3

On 09/16/2010 05:59 AM, Petr Pisar wrote:

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   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]