cankao : https://blog.csdn.net/enjolras_fuu/article/details/96479807

 

 

mongoexport --host 127.0.0.1 --port 27017 --db ELSA_MILESTONE_SUBSCRIPTION_SERVICE --collection 'milestone_work_table' --type csv --fieldFile /opt/milestone_work_table.txt   --out /opt/milestone_work_table.csv  --limit 5

mongoexport -d test -c records -q '{ a: { $gte: 3 }, date: { $lt: { "$date": "2016-01-01T00:00:00.000Z" } } }' --fields "_id,a,b,c,date" --type=csv --out exportdir/myRecords.csv

mongoexport -d test -c records -q '{ a: { $gte: 3 }, date: { $lt: { "$date": "2016-01-01T00:00:00.000Z" } } }' --fieldFile fields.txt --type=csv --out exportdir/myRecords.csv



原文链接:https://blog.csdn.net/enjolras_fuu/article/details/96479807

 
posted on 2020-01-14 11:45  lshan  阅读(1450)  评论(0编辑  收藏  举报