× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

How to pretty-print query results in MongoDB shell

Sergio Tulentsev
Jul 31, 2015
<p>You can ask it to be pretty :)</p> <pre><code>db.collection.find().pretty()</code></pre> <p>To enable this permanently, you can add</p> <pre><code>DBQuery.prototype._prettyShell = true </code></pre> <p>to your file in <code>$HOME/.mongorc.js</code></p> <p> </p>

Get New Tutorials Delivered to Your Inbox

New tutorials will be sent to your Inbox once a week.

comments powered by Disqus