当寻找的路径,可执行文件或检查,如果你在Unix shell中输入命令的名称会发生什么,有不同的公用事业过多(which,type,command,whence,where,whereis,whatis,hash,等)。
我们经常听说which应该避免。为什么?我们应该用什么来代替?
以下是bash日志的一部分,完整的日志可以在https://gist.github.com/limkokhole/f2a423112aa005f10862获取:
[xiaobai@xiaobai hello]$ dnf --verbose download --source readline
cachedir: /var/cache/dnf
Loaded plugins: noroot, needs-restarting, reposync, copr, playground, kickstart, Query, generate_completion_cache, builddep, download, config-manager, protected_packages, system-upgrade, debuginfo-install
DNF version: 0.6.4
repo: using cache for: spot-chromium
not found deltainfo for: Copr repo for chromium owned by spot
not found updateinfo for: Copr repo for chromium owned by spot
repo: using cache for: rpmfusion-nonfree-updates-testing
not found deltainfo for: RPM Fusion for Fedora 21 - Nonfree - Test Updates
not found updateinfo …Run Code Online (Sandbox Code Playgroud) shell ×2
bash ×1
dnf ×1
fedora ×1
history ×1
portability ×1
repository ×1
rhel ×1
rpm ×1
which ×1