未格式化打印
> db.games.find() { "_id" : ObjectId("53d077372826c5d3aae7ad6a"), "game" : "pinball", "user" : "joe", "score" : 5050 }
格式化打印
> db.games.find().pretty() { "_id" : ObjectId("53d077372826c5d3aae7ad6a"), "game" : "pinball", "user" : "joe", "score" : 5050 } >
修改文件,使得find可直接格式化打印
[root@server ~]# echo "DBQuery.prototype._prettyShell = true" >> ~/.mongorc.js
待续。。。。
本文出自 “always_yunwei” 博客,请务必保留此出处http://alwaysyunwei.blog.51cto.com/3224143/1529584