如果您使用的是Bash或zsh,请使用以下命令:
type -a lshw
这将显示目标是内置,函数,别名还是外部可执行文件。如果是后者,它将显示在中显示的每个位置
PATH。
bash$ type -a lshwlshw is /usr/bin/lshwbash$ type -a lsls is aliased to `ls --color=auto'ls is /bin/lsbash$ zshzsh% type -a whichwhich is a shell builtinwhich is /usr/bin/which
在Bash中,对于函数,
type -a还将显示函数定义。您可以
declare -ffunctionname用来做同样的事情(您必须对zsh使用它,因为
type -a没有这样做)。



