http://www.cnblogs.com/abeen/archive/2010/08/09/1795979.html
mongoDB高级查询条件操作符
回复
dump.js
var c = db.user.find({nick_name:{$exists:true,$ne:''}}).limit(100); while(c.hasNext()) { printjson(c.next()); }
mongo 192.168.2.201:41211/dc_user dump.js > feed.json
dc_user库的user表的指定数据会以json形式保存在feed.json中。
注意:printjson输出的是格式化的json文本,便于查看数据,但是不能用mongoimport导入,如果需要导入替换printjson为printjsononeline
Tested this in IE, Chrome, Safari, Firefox (latest versions 2012-11-27):
Works in all of them...
from:
http://stackoverflow.com/questions/358874/how-can-i-use-a-carriage-return-in-a-html-tooltip
http://stackoverflow.com/questions/3340802/add-line-break-within-tooltips
mysqldump < mysqldump options> | gzip > outputfile.sql.gz