locate file on macOS

1. sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

2.  sudo /usr/libexec/locate.updatedb

3. locate [filename]

or

mdfind -name [filename]

references

https://apple.stackexchange.com/questions/350610/macos-mojave-locate-not-working

https://stackoverflow.com/questions/38373920/locate-linux-command-alternative-for-mac-osx

這個網誌中的熱門文章

Upgrade php and httpd(apache) on CentOS 7

Installing VMware workstation pro on Ubuntu 22.X (Jammy Jellyfish)