updatedb daily cron job
hi,
when i sometimes run locate, it tells me if have to enable the updatedb daily cron job How cna i do this? |
Put the following script into /etc/cron.d/slocate:
Code:
#! /bin/sh |
so the script has to be called "slocate" right?
|
It doesn't have to be, but that's its name on my system.
|
hi
i added that script but now it's still tells me the update the daily cron job ... any idea why the "locate" command still tells me this? thx |
Probably because the cron job hasn't run yet and the updatedb is > 24 hours old.
|
so when do i know when the update runs automatically then?
me confused :rolleyes: |
did you make sure the file was executable? are you seeing anything from cron in the system logs?
|
hi
you have to realize i'm a linux beginner, i dont know how to make a file executable and dont know anything about system logs ! I use linux for 1 month now, so you have to explain it to me because i dont have any idea what you are talking about, sorry thx |
Do 'chmod +x /etc/cron.daily/slocate'. Then try running /etc/cron.daily/slocate (just type it at the command line) and see if you get any errors, or if it works.
|
hi
does it have to be in cron.d or cron.daily? I tried running it: went to cron.d and did slocate but then i get this :S Code:
[root@dd57648b1 cron.d]# slocate I'm just a beginner |
No, that's the actual slocate program. In cron.daily, do './slocate'.
|
ow yeah sorry, i forgot the "./"
|
All times are GMT -5. The time now is 04:31 PM. |