I was just trying to find a file on my test webserver so I ran "locate foo.conf" and it told me it was in /usr/lib. But then when I went to /usr/lib, I couldn't find the file.
So I tried running "ls $(locate foo.conf)" and it told me that the file didn't exist. Does anybody know why this would happen?
locate uses a database generated and updated by the updatedb command that is run by cron ( usually every night). So it is possible your database is out of date. Try the following and then run the locate command again: