Receiving an error trying to locate a file

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5

Issue

  • I am receiving the following error when trying to locate a file:
locate: unexpected EOF reading `/var/lib/mlocate/mlocate.db'

Resolution

  • Run the updatedb command to recreate the mlocate.db database.
# updatedb

Root Cause

  • The mlocate.db file is missing, possibly due to a filesystem check having been run.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.