Reputation: 7148
I am trying to inspect a document that is larger than the print buffer for the Windows command window. For some queries more allows you to type it
for more output. Is there a way to apply this to other commands?
For instance I might do db.coll.findOne()
which greatly surpasses the print buffer. I'd like to see as much as fits, type it
, see more, etc.
Upvotes: 0
Views: 718
Reputation: 1580
You can always extend you windows terminal's buffer.
At left top corner, click right mouse button and select properties. At layout tab, you can change "Screen buffer size" to width 9999 and height 9999, that's quite big scroll back buffer... Same time you can enlarge your "window size" to cover whole screen (if you want) and change your font to smaller (you can fit more text to screen).
Upvotes: 1
Reputation: 2332
You could use this workaround:
Make a file with your command... i.e. tmp.txt containing
db.coll.findOne()
Then execute the query via command line - piping the output to an output text file like this:
mongo yourDatabaseName < tmp.txt > output.txt
Upvotes: 1