locate command doesn't work, but I found out I had to run
updatedb. However, upon invoking that command, bash says
bash: updatedb: command not found. What should I do?
I think you need to install the locate program. In a debian lenny system, the /usr/bin/updatedb file is a symlink to /etc/alternatives/updatedb which is a symlink to /usr/bin/updatedb.findutils.
Using dpkg -S you can find what package a file belongs to:
So I think you need to install locate and then run updatedb as root.
Edit: yes, you need the locate package. In the file /usr/share/doc/findutils/NEWS.Debian.gz you can read:
and then in /usr/share/doc/findutils/changelog.Debian.gz, on the changelog on 11 nov 2007:
It was not installed and not in the directories listed by natxo, but I found a solution to install it. Thank you for the lead guys!
Must of the command that must be run as root are not in the user's $PATH so just run:
and it should work.
You have to invoke 'updatedb' with administrative privileges. As far is I remeber, findutils are part of a standard Debian distribution /installation, so have a look at /etc/updatedb.conf and /etc/cron.daily/(s)locate.
If nothing's broken, the built of a fresh updatedb [locate database] is a daily cronjob, so you dont'have to worry about this anyway
protected by Chris S May 18 '13 at 17:41
Thank you for your interest in this question.
Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?