skip to Main Content

I had already "rm" a file called "mongod.conf" in my user local folder. However, I could still find it by using "locate", while it was not there anymore by using "ls -al".

I had made sure there were no mongodb server runing. I had even powered off my computer and reboot again. I could still "locate" "mongod.conf" file. How strange!

I had also created some other files with a different file name and "rm" them. Then I could not "locate" them anymore.

Can anyone tell me what was going on here? Thanks in advance!

2

Answers


  1. Chosen as BEST ANSWER

    "locate -e mongod.conf", then I cannot locate it any more. "-e" means "only print entries for currently existing files". But why "-e" is not default behavior of "locate"?


  2. sudo updatedb

    locate needs to update its database for newest files.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search