6 ms·
Yeah, no thanks, I'm going to keep using `which`, and distributions are going to support it, no matter how "standard" `command -v` is. The only reason we're tal
by tptacek 5y ago
Yeah, no thanks, I'm going to keep using `which`, and distributions are going to support it, no matter how "standard" `command -v` is. The only reason we're talking about this is that it's so noteworthy that any distro would seriously suggest people avoid `which`, which is the de facto standard.
- chasil 5y agoBusybox also supports both variants, which is nice. C:\Users\luser>busybox64 sh ~ $ command -v ssh C:/WINDOWS/System32/OpenSSH/ssh.exe ~ $ which ssh C:/WINDOWS/System32/OpenSSH/ssh.exe ~ $ exit
- GauntletWizard 5y agoBusybox supports may subcommands, and on systems based on it virtually every common command is aliased to it, but nice isn't included. which which /bin/which which nice So, no, `which` is not `nice` :). Edit: I just pulled the the latest dockerhub image, and nice is one of the included applets. So if you really want which to be nice, upgrade busybox.
- oweiler 5y agoThere are enough dists which don't support which.
- coldtea 5y agoAny that more than 10 people use?
- Seirdy 5y agoThe Fedora base image does not include which. The base image is what's used in the standard OCI Fedora container, some Flatpak work, and some other things. Arch also doesn't include "which", nor do some arch-based distros.
- maxnoe 5y agoArch uses zsh in the Installation Medium and bash as default shell of the code System, both have which as a builtin function.
- pxc 5y agoExcept the behavior of the builtin is not the same as the behavior of the program, and Arch's base package doesn't include the which command.
- orhmeh09 5y agoFWIW, Debian uses dash as its default shell. It does not appear to have which as a builtin.
- Seirdy 5y agoI wasn't referring to the installation medium, but the base image typically used for setting up servers/chroots/containers.
- jfrunyon 5y ago... huh? which is not a bash builtin.