mongodb - get Files from Mongo GridFS in bash Script -


is in bash script possible files, based on objectid, stored on in mongo gridfs databse.

with following command can binairy data chunks.

objectid=objectid("5608dd301a8014a568f71921");  mongo localhost:27020/test_files --eval 'db.fs.chunks.find({"files_id":'${objectid}'},{"data":1,"_id":0}).limit(1).foreach(printjson)'; 

but want have binairy data stored in text file on filesystem, based on objectid. possible?


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -