Macos Locate Fix And Alternative
This article compares two methods for fixing and updating the locate command in MacOS. Comment A utilizes a launch daemon and terminal commands, while Comment B suggests repairing it using mdfind terminal commands.
the fix
to enable the service:
1  | sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist  | 
to update locate db:
1  | sudo /usr/libexec/locate.updatedb  | 
or, more conveniently:
1  | sudo ln -s /usr/libexec/locate.updatedb /usr/local/sbin/updatedb  | 
alternative
use mdfind