15.updatedb and locate

Source: Internet
Author: User

Ocate:
Non-real-time, fuzzy matching, lookup is based on the system-wide file database;
# UpdateDB, manually generate the file database
Fast speed

Search by keyword Blur
1. Set up a locating index library
-Executive UpdateDB
-Default location:/var/lib/mlocalte/mlocate.db

2. Locate Positioning tool
-Format: Locate [options] keyword
Fast lookup, need to generate database through UpdateDB
Options:
-I: Ignore case when finding
-R: Lookup to make use of regular expressions
3, delete/Newly added file object, need to update the index library to reflect the effect
The files in the Temp folder are not in the file repository search scope



Locate
1. When querying is based on a predefined database query all the paths and files in the system
2. Must be defined by the administrator first
3. Full path search, not file search
4. Only directories with Read and execute permissions can be searched

-N X: Lists only start to fifth
-E Dir1 Dir2: Specify search from Dir1 directory, DIR2
-I: Ignore case

UpdateDB: Updating the database

15.updatedb and locate

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.