[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with updatedb
Re: problem with updatedb
Mon, 27 Mar 2006 23:10:57 -0700
Gabriel Petit N. wrote:
> I'm trying to updatedb but always says: "updatedb: new database would be
> I'm using debian from a knoppix hd installation, kernel 184.108.40.206 (it
> happens with any kernel).
Thank you for your report. Note that Knoppix is not really Debian.
It has a basis in Debian. But it is also a mix of other distros.
Knoppix is a great live cd system. But I can't recommend it for a
hard drive installation. Instead I would recommend Debian itself, or
Ubuntu which is another distro based on Debian.
> My locatedb is supposed to be /var/cache/locate/locatedb because locate
> says: "locate: atención: la base de datos `/var/cache/locate/locatedb'
> tiene una antigüedad de más de 8 días" (spanish).
> I've tried giving paths manually but always get the same.
> I don't know what else do and google isn't helping either.
I don't have a Knoppix hard drive installed system at the moment. But
on my Debian system the findutils updatedb script is called daily by
cron through the /etc/cron.daily/find script. This script calls
/usr/bin/updatedb to do the work.
The updatedb script defaults to /var/cache/locate/locatedb for the
locate database. Because this can take a long time it writes the file
off to the side and then moves it into place at the end. It could be
that you are having a permissions problem in the locatedb directory.
ls -la /var/cache/locate
drwxr-xr-x 2 root root 72 2006-03-27 06:39 ./
drwxr-xr-x 16 root root 448 2005-09-12 22:21 ../
-rw-r--r-- 1 root root 3164047 2006-03-27 06:39 locatedb
Check your /var/cache/locate directory. On Debian the directory is
owned by the findutils package and created when the package is
installed. If it does not exist you may want to remove and reinstall
the findutils package. But if that is the only problem then simply
creating the directory should be enough.
The script would normally be run from cron daily. You can run the
script manually. This would be useful for debugging.
If the script generates errors these could be tracked down. I often
debug scripts using 'sh -x scriptname'
sudo sh -x /etc/cron.daily/find
However that script is short and not very interesting. So you would
quickly move on to the updatedb script.
sudo sh -xc '. /etc/updatedb.conf ; /usr/bin/updatedb'
Hopefully this will be enough to help isolate the problem. But if not
please feel free to post what you have learned and ask for further