Git Bash seems to have nice support of various Linux commands. It even supports locate, though it never finds anything:
mypc@mypc MINGW64 ~
$ locate --regex .*?\/[^\/]+\.docx
I tried to update the locate database, but the support is not finished there:
mypc@mypc MINGW64 ~
$ updatedb
/usr/bin/updatedb: line 323: /usr/var/locatedb.n: No such file or directory
Failed to generate /usr/var/locatedb.n
Can I fix that by editing some script? What causes this problem?
from git bash run:
mkdir /c/Program\ Files/Git/usr/var; updatedb --localpaths='/c/'
Also you can add the following alias in your ~/.bash_profile:
alias updatedb="updatedb --localpaths='/c/'"
I havent tried the alias out yet bit I don't see why it would work.
Just make sure to either
source ~/.bash_profile
or open a new shell after you have added the alias so it gets loaded.
Thanks for the tip! Just wanted to add to @danielpflood's answer, that I needed to run "Git Bash" as administrator, to be able to create the needed /var/ directory. This is on Windows 10.
[wanted to add as a comment, but I do not have enough reputation for that.]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With