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

  • 85 Users Found This Useful
Was this answer helpful?

Related Articles

How to Add a User and Grant Root Privileges on Fedora 20

Step 1: Add the User It’s just one simple command to add a user. In this case, we’re adding a...

How to Create and Add a New Domain in Plesk

Step #1: Add New DomainTo create a new domain in Plesk 11+ you will click on the Add New...

How To Install Git on CentOS 6

Installation First, you’ll follow a simple best practice: ensuring the existing packages...

Backup Your WordPress Database with WP-CLI

In this article you will learn how to backup your WordPress database using the wp-cli tool....

How to Install WP-CLI

WP-CLI is a command line tool for interacting with and managing WordPress sites. WP-CLI is very...

Powered by WHMCompleteSolution