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

1111. appearing after print sequence - php -

excel - I can't get the attachement of the email PHP -

node.js - Express and Redis - If session exists for this user, don't allow access -