3 ms·
df is a standard utility, like ls or cd. Invoking df on a POSIX system should do the expected thing, and if it doesn't it means something is broken.
by lottin 9y ago
df is a standard utility, like ls or cd. Invoking df on a POSIX system should do the expected thing, and if it doesn't it means something is broken.
- mnw21cam 9y agoOn Unix/Linux, there is very little stopping the superuser from introducing new and inventive kinds of breakage, such as in this case. This one is just a little more amusing than most. But seriously, if root wants to install a new command called df and have it higher up in the PATH than the standard utility, why should the OS argue?
- oelmekki 9y agoNote that the OS doesn't argue :) But actually, it would be cool to have some kind of warning, like a POSIX linter that warns the user something broke the standard, and they can decide to ignore it and never hear about it again. I'm not a big fan of linters, usually, but it would make sense for end users tweaking their system.
- JdeBP 9y ago... only if one has used getconf PATH to set the path to the one that guarantees that. * http://pubs.opengroup.org/onlinepubs/9699919799/utilities/getconf.html http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ge... * http://pubs.opengroup.org/onlinepubs/9699919799/functions/confstr.html http://pubs.opengroup.org/onlinepubs/9699919799/functions/co... * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/uni...
- rmc 9y agoActually cd is a shell built in, not a separate binary