2

I'm trying to find a certain file for apache so I used the locate command to find it, however, when I go to the directory that locate says it is in, the file isn't there. Does anyone know why this might be? I've tried switching to the super user but it still doesn't show up. Thanks!

1
  • 1
    Whats the filename?
    – Dan
    Aug 25, 2014 at 18:43

1 Answer 1

4

The locate command uses a database, which is updated about once a day. While it gives fast results, it isn't necessarily accurate. If locate says a file exists, but it isn't there, it was moved or deleted after the last database update. Also see A file shows in “locate” command but don't exist. Why?

1
  • 1
    Upon completion, you can update it with updatedb command.
    – Lety
    Aug 26, 2014 at 0:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .