8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Macでupdatedbコマンドを実行する。

Last updated at Posted at 2018-02-03

以前locateコマンドの設定は行ったのだが、検索結果を見てみると情報が古かったのでupdatedbを実行して最新の状態にすることにした。

しかし、うまくいかない。

$ sudo updatedb
Password:
sudo: updatedb: command not found

どうやらMacでは/usr/libexec/locate.updatedbを使う模様。ちなみにsudoコマンドで実行しないとパーミッションでエラーになる。

$ /usr/libexec/locate.updatedb
/usr/libexec/locate.updatedb: line 97: /var/db/locate.database: Permission denied

$ sudo /usr/libexec/locate.updatedb
Password:

SUCCESS! などの表示がないので不安だが、locateコマンドを実行すると確かに最新の状態になっていた。

これでよし。

8
4
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?