db.foo.find().limit(300)
won\'t do it. It still prints out only 20 documents.
db.foo.find().toArray() db.foo.find().forEach(printjs
From the shell if you want to show all results you could do db.collection.find().toArray() to get all results without it.
db.collection.find().toArray()