The man page for df says setting BLOCKSIZE=HUMAN, and unsetting POSIXLY_CORRECT will cause df to operate as if the -h extensions were passed. Reproducible: Always Steps to Reproduce: root@elk root # export declare -x ANT_HOME="/usr/share/ant-core" declare -x BLOCKSIZE="HUMAN" declare -x CLASSPATH="." declare -x CONFIG_PROTECT="/usr/X11R6/lib/X11/xkb /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/xdvi/" declare -x CONFIG_PROTECT_MASK="/etc/terminfo" declare -x CVS_RSH="ssh" declare -x EDITOR="/bin/nano" declare -x GCC_SPECS="" declare -x GUILE_LOAD_PATH="/usr/share/guile/1.6" declare -x G_BROKEN_FILENAMES="1" declare -x HOME="/root" declare -x HOSTNAME="elk" declare -x INFODIR="/usr/share/info" declare -x INFOPATH="/usr/share/info:/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/info:/usr/share/info/emacs-21" declare -x JAVAC="/opt/blackdown-jdk-1.4.2.01/bin/javac" declare -x JAVA_HOME="/opt/blackdown-jdk-1.4.2.01" declare -x JDK_HOME="/opt/blackdown-jdk-1.4.2.01" declare -x LESS="-R" declare -x LESSOPEN="|lesspipe.sh %s" declare -x LOGNAME="dvogel" declare -x LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mng=01;35:*.xcf=01;35:*.pcx=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.avi=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.mov=01;35:*.qt=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.mp3=00;36:*.wav=00;36:*.mid=00;36:*.midi=00;36:*.au=00;36:*.ogg=00;36:*.flac=00;36:*.aac=00;36:" declare -x MANPATH="/usr/share/man:/usr/local/share/man:/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/man:/usr/share/man::/opt/blackdown-jdk-1.4.2.01/man" declare -x OLDPWD="/home/dvogel" declare -x PAGER="/usr/bin/less" declare -x PATH="/sbin:/bin:/usr/sbin:/usr/bin" declare -x PS1="\\[\\033[01;32m\\]\\u@\\h \\[\\033[01;34m\\]\\W \\\$ \\[\\033[00m\\]" declare -x PWD="/root" declare -x PYTHONDOCS="/usr/share/doc/python-docs-2.3.4/html" declare -x REMOTEHOST="c68.190.80.180.mad.wi.charter.com" declare -x SHLVL="2" declare -x SSH_CLIENT="68.190.80.180 38457 22" declare -x SSH_CONNECTION="68.190.80.180 38457 66.111.35.80 22" declare -x SSH_TTY="/dev/pts/5" declare -x TERM="xterm" declare -x USER="dvogel" declare -x XINITRC="/etc/X11/xinit/xinitrc" root@elk root # BLOCKSIZE=HUMAN df -x none Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda3 2956908 411088 2395616 15% / /dev/hda5 988212 18132 919880 2% /tmp /dev/hda6 9851308 4600640 4750248 50% /usr /dev/hda7 19694836 1256768 17437624 7% /home /dev/hda8 42401648 23491132 16756604 59% /var none 253856 0 253856 0% /dev/shm
you want to use `BLOCK_SIZE=human`
I am guessing we should then either patch it to accept 'HUMAN' as well, or fix the manpage?
the source code refers to "BLOCKSIZE" and "BLOCK_SIZE" in diff parts (in shared code too, not just df), so we should figure wtf the intended behavior is first :) but personally, i'd prefer we remove all 'BLOCKSIZE' references and have 'BLOCK_SIZE' work with case-insensitive 'human' ...
I had a look, and it seems the only real interface point is lib/human.[ch] which looks at the environmental variable BLOCK_SIZE, and then the stuff that use it(df, du, ls) calls human_options() to check it. They also check DF_BLOCK_SIZE, DU_BLOCK_SIZE, etc, but that is also passed to human_options(). The other BLOCK_SIZE, *_BLOCK_SIZE seems to be internal to whatever tool, and totally unrelated to the output blocksize. Anyhow, I fixed it in -r5 - nothing major, just make it work with BLOCK_SIZE=HUMAN-READABLE (or a shorter version of that), as I do not think its really needed to do case insensitive checking (you do not expect 'df --HuMaN-ReaDaBLe' to work, now do you :)).
Bleh, forgot to close.