Tag Archives: locate command

[MacOS] Locate Command fails in Terminal mode

I. Abstract

Users coming from Linux/Unix esteem the locate command, since it is fast and helps configuring and finding the appropriate files on our systems. Apple decided to implement this command a little disregardful. When executing the locate command you will most likely earn errors. The following will show you how to configure the locate database to have no errors anymore.

II. Enable locate command

We assume you have your root account enabled. Open a terminal window and do the following:

  • mac-client$ sudo /usr/libexec/locate.updatedb
    (provide your root password)

Being on Leopard you will receive this warning:

  • >>> WARNING
    >>> Executing updatedb as root. This WILL reveal all filenames
    >>> on your machine to all login users, which is a security risk.

III. Visit our Sponsor

If this article helped you, please consider our sponsor (Google-Adsense) and help us maintaining this project free. Thanks…

IV. Terminal picture