I have not used locate for a while and today when I look for a file that I had put away for more than a year, locate does not pick it up. I ran find to get it.

It appears that none of the files in my home directory are in the index. Only files & folders from system directories like usr, var, are located.

I tried updatedb but no luck. Has my home directory somehow got excluded from the index?

  • 1
    Did you ran the updatedb command with sudo? If not, repeat it with sudo. – Frantique Mar 3 '15 at 10:04
  • 1
    Yes, I did "sudo updatedb" – eshwar Mar 3 '15 at 10:06
  • See my answer below. – Frantique Mar 3 '15 at 10:13

Open the file /etc/updatedb.conf and check if the excluded path is listed in the PRUNEPATHS or the excluded path is using one of the filesystems enumerated in PRUNEFS.

If so, modify the conf file, and run again the sudo updatedb command.

(If you have encrypted your home directory while installing, then remove from the config the encryptfs entries.)

| improve this answer | |
  • 2
    Yes, it is. Removed it and ran updatedb and it works fine. Thanks – eshwar Mar 3 '15 at 10:42
  • 2
    If you have encrypted your home directory, consider not removing ecrypts from the PRUNEFS list of file system types for security reasons. See this answer instead. – nnunes Dec 22 '16 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.