Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 May 2017 18:12:12 +0200
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        freebsd-stable@freebsd.org
Subject:   Missing units in df -h output
Message-ID:  <59133BDC.8080509@quip.cz>

next in thread | raw e-mail | index | archive | help
Today I noticed missing units (G) in the output of 'df -h' command if 
size is exactly 1000G

This is on FreeBSD 10.3-RELEASE-p18 amd64 GENERIC

/# df -h /vol0/remote_backup/rico
Filesystem                       Size    Used   Avail Capacity  Mounted on
tank0/vol0/remote_backup/rico    1.4T    1000    443G    69% 
/vol0/remote_backup/rico

The same without -h

# df /vol0/remote_backup/rico
Filesystem                     1K-blocks       Used     Avail Capacity 
Mounted on
tank0/vol0/remote_backup/rico 1513215636 1048349068 464866568    69% 
/vol0/remote_backup/rico

I don't know if the G suffix is stripped by formatting to columns / size 
of field is limited to 4 characters if '-h' is used or anything else.

The FS is ZFS if this matters.

Is this known issue? Should I file PR for this?

Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?59133BDC.8080509>