Top "Mongo-shell" questions

The mongo shell is an interactive JavaScript shell for MongoDB, and is part of all MongoDB distributions.

How can I list all collections in the MongoDB shell?

In the MongoDB shell, how do I list all collections for the current database that I'm using?

mongodb mongo-shell
how can I connect to a remote mongo server from Mac OS terminal

I would like to drop into the mongo shell in the terminal on my MacBook. However, I'm interested in connecting …

mongodb mongo-shell
Pretty print in MongoDB shell as default

Is there a way to tell Mongo to pretty print output? Currently, everything is output to a single line and …

mongodb command-line-interface mongo-shell
How to list all users in the mongo shell?

In the MongoDB shell, how do I list all users for the current database that I'm using? I can't seem …

mongodb command mongo-shell
Printing Mongo query output to a file while in the mongo shell

2 days old with Mongo and I have a SQL background so bear with me. As with mysql, it is very …

mongodb io mongodb-query mongo-shell
How do you connect to a replicaset from a MongoDB shell?

If I'm writing an application which connects to mongodb then I can provide a seed list for a replicaset, and …

mongodb mongo-shell
mongorestore error: Don't know what to do with the dump file

I have mongo DB installed in the following path c:\mongodb\bin. I have configured my environment variable PATH in …

mongodb mongo-shell
How to replace substring in mongodb document

I have a lot of mongodb documents in a collection of the form: { .... "URL":"www.abc.com/helloWorldt/..." ..... } I want …

mongodb mongodb-.net-driver mongo-shell mongodb-update
Update in forEach on mongodb shell

I have got a collection aTable with 2 records: { "title" : "record 1", "fields" : [ { "_id" : 1, "items" : [ 1 ] }, { "_id" : 2, "items" : [ 2,3,4 ] }, { "_id" : 3, "items" : [ 5 ] } ] }, { "title" : "record 2", "fields" : [ { "_…

javascript mongodb mongo-shell
Update query in MongoDB shell

In the shell, my query is: db.checkin_4e95ae0926abe9ad28000001.update({location_city:"New York"}, {location_country: "FUDGE!"}); …

mongodb mongo-shell