terminal - Git bash:找不到whereis命令
问题描述
我在 Windows 机器上使用 git bash。whereis
除命令外,一切正常。终端告诉我找不到命令:
$ whereis grep
bash: whereis: command not found
我已经尝试添加C:\Program Files(x86)\Git\bin
到我的 PATH 中。
我该如何解决?
解决方案
where
在 Windows 中使用
在 Linux 中使用的命令whereis
等同where
于为 Windows 98 的 Windows 工具包提供的命令,并且默认包含在 Server 2003、Vista 和更新版本中:
$ where git
C:\Program Files\Git\mingw64\bin\git.exe
C:\Users\MyUser\scoop\shims\git.exe
更多信息
在 Windows 的 gitbash 中添加 .exe
当您想要.exe
gitbash 类型的可执行文件时,您应该添加以下路径关系:
C:\Program Files\Git\mingw64\bin\<EXE>.exe
或者有 ubication 的文件夹git
,但总是应该添加到mingw64\bin\
.
whereis
在 Windows 中安装
您必须下载以下文件:whereis.zip
解压缩后,您应该复制以下
whereis.exe
文件:mvp_tips/whereis/Debug/
并将其复制到:
C:\Program Files\Git\mingw64\bin\
如果一切顺利,请关闭所有
GitBash
选项卡并重新打开其中一个并输入:$ whereis whereis C:\Program Files\Git\mingw64\bin\whereis.exe #And what should come out if everything is correct:
下载和安装脚本
运行Git Bash
为Run As Administrator
#!/bin/bash
wget www.flounder.com/whereis.zip
unzip whereis.zip
cd mvp_tips/whereis/Debug/
cp whereis.exe 'C:\Program Files\Git\mingw64\bin\'
source ~/.bashrc
whereis whereis
推荐阅读
- laravel - npm install 到一个新的 Laravel 项目中 - 错误消息
- r - 从数字的分区生成排列
- python-3.x - TensorFlow 如何从 s3 字节流中读取文件
- microsoft-graph-api - 如何使用 msgraph-sdk-java 更新用户个人资料照片?
- reactjs - 如何将单个组件用作带有 react-native tabview 的新实例
- java - 我们可以在生产系统上免费使用 zulu jdk 1.8 吗?
- matlab - 如何在 Matlab/Simulink 中获取有关错误“来自非结构数组对象的结构内容引用”的详细信息?
- reactjs - 在 React 中导入引导 CSS 无法编译
- paw-app - 移除 Paw 中的所有 URL 参数
- java - 递归创建完整且完整的二叉树