0

I tried using locate to locate a certain file which is dog.jpg, I just updated the locate database and it does not show up since locate only finds files owned by user nobody, and the file dog.jpg is owned by user vincent. As stated here,

The locate database is typically built by user nobody'' and the locate.updatedb(8) utility skips directories which are not readable for usernobody'', group ``nobody'', or world. For example, if your HOME directory is not world-readable, none of your files are in the database. how do I make locate command find dog.jpg even though it is owned by user vincent? I tried adding user nobody to wheel group, it does not show too.

Any other work around or advice? Thank you!

New contributor
Vincent Ret is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Some of the statements in your question are incorrect. Locate can find files owned by any user, as long as those files can be read by any user. So are you trying to create a locate database that contains your private files? – Richard Smith Jul 12 at 9:11
  • I want locate to find all files in my computer, do you have a solution for that? – Vincent Ret Jul 13 at 6:38
  • Have you tried running locate.updatedb as root? – Richard Smith Jul 13 at 12:00

Your Answer

Vincent Ret is a new contributor. Be nice, and check out our Code of Conduct.

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

Browse other questions tagged or ask your own question.