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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -