where
和which
shell命令有什么区别?这里有些例子
~ where cc
/usr/bin/cc
/usr/bin/cc
~ which cc
/usr/bin/cc
和
~ which which
which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
/usr/bin/which
~ which where
/usr/bin/which: no where in (/usr/local/bin:/bin:/usr/bin:/home/bnikhil/bin:/bin)
也
~ where which
which: aliased to alias | /usr/bin/which --tty-only --read-alias --show-dot
--show-tilde
which: shell built-in command
/usr/bin/which
/usr/bin/which
~ where where
where: shell built-in command
在我看来,它们作为内置的shell会做同样的事情,不太确定这与命令有何不同?