Home > Linux Tricks > updatedb: command not found – How to Fix

updatedb: command not found – How to Fix

September 16th, 2009 Leave a comment Go to comments

This problem appears usually if you have a new server and there are no packages installed yet. If you need to use locate command for any reasons, you should run updatedb periodically in order to ensure you have the most recent cache of your file positions.

if you receive command not found error, it usually means you have no slocate package installed. On most modern linuxes you can install it using your package manager (yum, apt-get, etc). You are also welcome to compile it from source, that can be found at http://slocate.trakker.ca/ . I don’t think you should have problems with this package; you will then be able to run updatedb and locate.

It is not recommended to run updatedb if you have lots of files on your machine. In this case updatedb execution can slow down your server. But if the number of files is not so high, locate is probably the fastest way to find the files you need.



Categories: Linux Tricks Tags:
  1. No comments yet.
  1. No trackbacks yet.