3

It seems that Apple doesn't want us to use locate, at it is making it so hard to setup.

If there a way to use finder database from the command line? Maybe I can make an alias.

I would appreciate solutions that would not require system reconfiguration, just because I don't want to repeat the process each time I upgrade the system of switch computers.

sorin
  • 29,875
  • locate works fine: sudo /usr/libexec/locate.updatedb –  Apr 08 '12 at 21:18
  • What is so hard? You asked this question and got an answer here: http://apple.stackexchange.com/questions/14836/how-to-automate-execution-locate-updatedb-by-using-a-bash-script –  Apr 08 '12 at 21:20
  • @mankoff yes, it works as long you are updating its database, and also cron does not work anymore, so you have to install it in launchd… so it is much easier to add alias locate="mdfind" – sorin Apr 08 '12 at 21:20

1 Answers1

4

You could use mdfind, which uses the Spotlight database. More information on this man page.

jmlumpkin
  • 8,795