Receiving an error trying to locate a file
Environment
- Red Hat Enterprise Linux 5
Issue
- I am receiving the following error when trying to
locatea file:
locate: unexpected EOF reading `/var/lib/mlocate/mlocate.db'
Resolution
- Run the
updatedbcommand to recreate themlocate.dbdatabase.
# updatedb
Root Cause
- The
mlocate.dbfile 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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
