I was trying to update the locate database, but when input sudo /usr/libexec/locate.updatedb
, I got a bunch of errors. When I try to use locate again it would not work. I can’t remember what I did, but I ended up finding out that the locate.updatedb
file had been corrupted. I got locate to work again by using Time Machine to recover the locate.database file. But I want to be able to update locate without corrupting the file. How do I fix this?
MacOS – Locate tool won’t work, how to fix
macosterminal
Related Question
- MacOS – Can’t install zeroMQ on Mavericks
- MacOS – osx corrupts usb (exFAT) on restart
- MacOS – Find all hidden files that were hidden using the command “chflags hidden filename”
- Locked file is stuck in trash
- MacOS – How to restore files when the account isn’t granted access
- MacOS Mojave – locate not working
- MacOS – lots of errors after sudo bash in terminal
Best Answer
Open Terminal.app and run the following two commands:
The "cd /" part is important as you need to be in a path where the user "nobody" has permissions.