unix - 相当于 PowerShell 中的 *Nix 'which' 命令?

标签 unix powershell command

如何询问 PowerShell 某物在哪里?

例如,“which notepad”,它会根据当前路径返回运行 notepad.exe 的目录。

最佳答案

开始在 PowerShell 中自定义个人资料后,我创建的第一个别名是“which”。

New-Alias which get-command

要将其添加到您的个人资料中,请输入以下内容:

"`nNew-Alias which get-command" | add-content $profile

最后一行开头的“n”是为了确保它将作为新行开始。

关于unix - 相当于 PowerShell 中的 *Nix 'which' 命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63805/

相关文章:

jsf - JSF CommandButton onclick不调用Javascript函数

unix - 如何通过CLI重命名7zip存档中的文件?

c++ - 错误 : implicit declaration of function `int open(...)'

unix - 如何一次性使用剪切和粘贴

powershell - 为什么总是提示我确认?

c++ - 从命令提示符编译 BADA 应用程序

linux - shell脚本时找不到命令错误

powershell - Web浏览器控件中的Powershell UI自动化

powershell - Powershell输出列宽度

linux - linux中find和sed命令的错误?