BradB
BradB

Reputation: 513

Git bash: whereis command not found

I am using git bash on a windows machine. Everything works normally except for the whereis command. The terminal tells me the command is not found:

$ whereis grep
bash: whereis: command not found

I have already tried adding C:\Program Files(x86)\Git\bin to my PATH.

How do I fix this?

Upvotes: 6

Views: 15571

Answers (1)

Use the where in Windows

Utilized the command whereis in Linux is equals that command where , provided for the Windows kit for Windows 98, and is included by default in Server 2003, Vista, and newer versions :

$ where git
C:\Program Files\Git\mingw64\bin\git.exe
C:\Users\MyUser\scoop\shims\git.exe

More information

Add the .exe in gitbash for Windows

While you want an executable of the type .exe in gitbash you should be add in the follow path relation :

 C:\Program Files\Git\mingw64\bin\<EXE>.exe

Or where there is ubication the folder git but always should be add in mingw64\bin\.

Install whereis in Windows

  • You must download the following file:whereis.zip

  • Once unzipped, you should copy the whereis.exe file that is in :

    mvp_tips/whereis/Debug/
    
  • And copy it in :

    C:\Program Files\Git\mingw64\bin\
    
  • If all went well, close all the GitBash tabs and reopen one of them and enter :

    $ whereis whereis
    C:\Program Files\Git\mingw64\bin\whereis.exe #And what should come out if everything is correct:
    

Script for download and installation

Run the Git Bash as 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

Upvotes: 5

Related Questions