Error when update "locate" database

I'm running a Lion system (10.7.3) that was upgraded from Snow Leopard. I want to update the "locate" database. I tried what is prescribed everywehre I've searched on line:


sudo /usr/libexec/locate.updatedb


That gives errors:



shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

find: .: Permission denied


What's wrong and how does one fix this?


Note that now, whenever I try to use locate, I get no output; before I ran the locate.updatedb command, locate had been working as expected.

iMac, Mac OS X (10.7.3), 3.4GHz Corei7, 16GB, SSD + 2T HD

Posted on Feb 27, 2012 11:59 AM

Reply
7 replies

Nov 2, 2015 2:50 AM in response to murrayE

Hi all,

I have been experiencing all kind of problems when updating the database of my Mac Os X.

I run Yosemite 10.10.5 on a Mac book Pro 13" ,late 2011.


I have tried

-- sudo /usr/libexec/locate.updatedb

from / directory tells me it doesn' t recognise "install" command at line 37 of locate.updatedb


-- sudo -u root /usr/libexec/locate.updatedb

same results


This is since one week now and I don't have anymore a locate.database in /var/db/ I tried to run locate once in order to re-create the database,

it suggests me to run

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


but when I do it, it tells me the same process is already on (this message appears since 10 days and still no database) ..


Can anyone help Please...

Thanks

Davide

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Error when update "locate" database

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.