/usr/libexec/locate.updatedb not working in Snow Leopard

I can't seem to update the locate database in Snow Leopard like I used to:

running sudo /usr/libexec/locate.updatedb results in the following error message:

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

Anyone experience this issue??
HawNetsAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
marookConnect With a Mentor Commented:
1: The deamon is scheduled to run on weekday 6 @ 03:15 (saturday, I guess)

2: Yeah, you need to unload it in order to run it.

Maybe your locate.db has gone corrupt? Maybe try to delete it and see if it updates (on next run)
Anyway, it seems that the launchdeamon has two argumetns, so maybe the following will run:

sudo /usr/libexec/locate.updatedb /var/db/locate.database false
0
 
marookCommented:
Locate has change a bit in 10.6:

JAP-MBP.local [~] >locate jap

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.
0
 
HawNetsAuthor Commented:
If the daemon is already running, when you run:

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

You get this message:
com.apple.locate: Already loaded

Is there a way to force this daemon to run an update immediately?

Do I need to unload it first?
0
All Courses

From novice to tech pro — start learning today.