Home > Software design >  Why can mongod.conf file still be located after I have deleted it in ubuntu 20.04
Why can mongod.conf file still be located after I have deleted it in ubuntu 20.04

Time:10-16

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!

CodePudding user response:

"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"?

CodePudding user response:

sudo updatedb

locate needs to update its database for newest files.

  • Related