How to Install mlocate (locate and updatedb Commands) on CentOS 6

One of the best tools for quickly finding files by filename is the locate command. The locate command reads one or more databases prepared by updatedb and writes file names matching at least one of the patterns to standard output, one per line.

 
Step 1: Install mlocate


As a matter of best practice we’ll update our packages:

yum -y update


Then let’s install mlocate and any required packages:

yum -y install mlocate


Step 2: Updating mlocate


The following command will update the search databases:

updatedb


mlocate installs a cron job that will run daily to update search databases at:

/etc/cron.daily/mlocate.cron

  • 61 Users Found This Useful
Was this answer helpful?

Related Articles

How To Update the Kernel in CentOS / Red Hat

Updating the kernel on Red Hat Linux or CentOS Linux is a very simple process. Most commonly you...

How to: Using killall to Stop Processes with Command Line

Sometimes you may find your server in a state of high load caused by out control of processes....

Using Telnet To Check SMTP Service

One of the most common e-mail issues we encounter in our support department is customers who are...

Remove a MySQL User on Linux via Command Line

Login to MySQL First we’ll login to the MySQL server from the command line with the...

How to Install the Xfce Desktop Environment on Ubuntu 14.04 LTS

By default XWeb servers running Ubuntu 14.04 don’t include a graphical desktop environment. It’s...

Powered by WHMCompleteSolution