MACでロケートコマンドを使えれば、
なにかと便利なので、導入するまでの手順を記載してみました。
まず簡単に macのキーワードを探してみる。
locate mac
コンソール
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.
ocate.database がありませんメッセージが表示される。
メッセージの通り、下記を実行する
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
例えば、readme.txtの名前を探したいときは?
locate readme.txt
検索DBの更新は以下のコマンドで、
/usr/libexec/locate.updatedb