我是一个长期使用csh的用户,现在想(痛苦地)转换到bash。如果这是一个新手问题,那么请原谅,我已经尝试过在网上搜索,但当你搜索的内容也是一个常见词时,谷歌并没有提供很好的帮助。
在bash中,'where' 内置命令有什么等效的命令?
"where: Reports all known instances of 'command', including aliases, builtins and executables in path."
我不太关心别名和内置命令。我最感兴趣的是找到一个可执行文件,因为路径中之前有另一个版本的可执行文件而未被'which'报告。
which -a <程序>
相比如何? - CWSpearwhich -a
不会报告 shell 内置命令,而type
会。例如,$ type cd
将显示cd 是一个 shell 内置命令
,而which
返回空。 - Haomin Li