Solve Centos 6.3 Without locate

Source: Internet
Author: User

A lnmp test was performed to minimize the installation of centos 6.3 in the past few days.

Today, I opened this Vm and used locate to find files.

Prompt

-Bash: locate: command not found


So let's start updatedb.

Prompt

-Bash: updatedb: command not found


I thought about it. Since it was a minimal installation, I could understand it without the locate command. so yum install slocate didn't have such a package. I was wondering at the time! Haha, Google has discovered that the locate of the new release system is no longer a slocate but changed to mlocate.

Mlocate is a variant of GNU locate. Compared with the original locate, it has a good advantage:


* You do not need to re-read the contents of all directories every time you update the database. Mlocate is saved in the database
The timestamp information can be used to determine whether the directory content is changed without re-reading. Therefore, the update speed is faster.
Is also less occupied. This is a unique function of mlocate.


The above section describes the deb package of the mlocate that has been translated. I would like to pay tribute to the translator! This feature is very good. Previously, when I used locate, the hard disk was squeaking every time I updated the database, so I had to change it to updating the database once a week. Mlocate makes me almost unable to feel its existence.


It seems that mlocate has become the standard for Debian, because I have not installed it, it is already there. I originally wanted to install locate and found that the locate command was already available. Later I found it was provided by mlocate.


With mlocate, you can delete the locate. Otherwise, your system will update two different databases.


It turns out that mlocate has replaced slocate.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.