How can I exclude certain files and/or directories from the mlocate/updatedb database?

Solution Verified - Updated -

Issue

  • How to exclude certain files and/or directories from the mlocate/updatedb database?
  • I have directories that contain very large files, and I'd like to exclude them from being scanned by updatedb.
  • How to ignore paths from updatedb scan?

Environment

  • Red Hat Enterprise Linux (RHEL) 5, 6, 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In