bin/183681: df(1): -h and -H option: manual page have them swapped
Robin Hahling
robin.hahling at gw-computing.net
Tue Nov 5 12:20:01 UTC 2013
>Number: 183681
>Category: bin
>Synopsis: df(1): -h and -H option: manual page have them swapped
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 05 12:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Robin Hahling
>Release: 10.0-BETA1
>Organization:
EPFL
>Environment:
FreeBSD odin-fbsd-current 10.0-BETA1 FreeBSD 10.0-BETA1 #0 r256420: Sun Oct 13 01:43:07 UTC 2013 root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
The manual page of df(1) has the -h and -H options swapped.
The bug exists since 2012-11-16 and has been introduced by this commit (r243129):
http://lists.freebsd.org/pipermail/svn-src-all/2012-November/061588.html
-h option has historically been based on powers of 1024 whereas -H options on powers of 1000.
If you run the following:
% df -h; df -H
Filesystem Size Used Avail Capacity Mounted on
/dev/ada0p2 112G 2.1G 101G 2% /
devfs 1.0K 1.0K 0B 100% /dev
Filesystem Size Used Avail Capacity Mounted on
/dev/ada0p2 121G 2.3G 109G 2% /
devfs 1.0k 1.0k 0B 100% /dev
You can notice that sizes with -H are actually larger, hence based on powers of 1000.
Thus, the manual page have them wrong (swapped), since the aforementioned commit:
-H ``Human-readable'' output. Use unit suffixes: Byte, Kibibyte,
Mebibyte, Gibibyte, Tebibyte and Pebibyte (based on powers of
1024) in order to reduce the number of digits to four or fewer.
-h ``Human-readable'' output. Use unit suffixes: Byte, Kilobyte,
Megabyte, Gigabyte, Terabyte and Petabyte (based on powers of
1000) in order to reduce the number of digits to four or fewer.
>How-To-Repeat:
Have a look at the manual page and compare it with the output of df -h; df -H (or have a look at bin/df.c).
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list