Busybox master df - always -h whoops had bash ALIAS

is it just me, or does busybox master always report with -h option?

EDIT: nevermind... just typed exit from bash to sh... and all is ok... so it is a lack of shebang/bashism. probably have and alias...

EDIT2: script had shebang.... interesting... so my bash alias... was inherited by the script...... ok.... never had that issue before..... suppose this is normal?

For the future:

type df
readlink -f $(type -p df)
1 Like
which df: /bin/df
type df: df is /bin/df
readlink -f $(type -p df): /bin/busybox

bash>type df: df is aliased to `df -h'
bash>readlink -f $(type -p df) ( probably because df translates to df -h YUP)

BusyBox v1.31.0 () multi-call binary.

Usage: readlink [-fnv] FILE

Display the value of a symlink

	-f	Canonicalize by following all symlinks
	-n	Don't add newline
	-v	Verbose

Note to self.... never alias commands as the command name!

1 Like

Using which is not a reliable method.

$ which echo
/usr/bin/echo

$ /usr/bin/echo --version
echo (GNU coreutils) 8.31

$ echo --version
--version

$ type echo
echo is a shell builtin

$ echo ${SHELL}
/bin/bash
1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.