Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to find this info everywhere and couldn't find it. I already change mongodb.conf so I forget where the original directory is.

share|improve this question

When you are searching a file in your filesystem while you are running Ubuntu a very easy way to find it is to do the following:

  1. Update the database with your files (may be a bit slow, depending on when it run the last time automatically from your system):

    sudo updatedb
    
  2. Search for the corresponding file (super quick):

    locate mongodb.conf
    

The config file name has recently change, now use locate mongod.conf (no more "b") (or just locate '*mongo*.conf', if you aren't sure).

share|improve this answer
    
The config file name has recently change, now use "locate mongod.conf" (no more "b") – Nick Pineda May 21 at 21:49

I'm not sure for amazon ec2 exactly but on my machine it is located at /var/lib/mongodb

share|improve this answer

IMO finding files with locate isn't the best approach, since you have to know the identical name of the file you're searching

Try instead

find / -name mondo*.conf
share|improve this answer
    
Have you looked at locate's manpage? It supports both wildcards and regular expressions. – muru May 22 at 16:41
    
You are right, I haven't - yet you could've gave an example of its usage in the same scenario. – Betro Hakala May 22 at 17:00
    
locate '*mongo*.conf', or simply: locate mongo. – muru May 22 at 17:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.