The MD5 is stored in the Fs.files metadata information after uploading, which is used to verify the MD5 value after the user gets the large file.
The way to view MD5 values in Linux is: md5sum file name
So let's look at the MD5 of the get file from MongoDB and the Gridfs MD5 stored in MongoDB.
[[email protected] ~]$ sudo /usr/local/mongodb/bin/mongofiles put mongodbbook.tar.gz [sudo] password for neil: connected to: 127.0.0.1added file: { _id: objectid (' 5508369eb70bc8bfebd8790c '), filename: " MongodbBook.tar.gz ", chunksize: 261120, uploaddate: new date (1426601630461),  MD5 : "85c0c93f51ebe9c609ffe4f9da71c63e", length: 203 }done! [[Email protected] ~]$ sudo /usr/local/mongodb/bin/mongofiles listconnected to: 127.0.0.1mongodbBook.tar.gz203[[email protected] ~]$ md5sum mongodbBook.tar.gz 85c0c93f51ebe9c609ffe4f9da71c63e mongodbbook.tar.gz[[email protected] ~]$ rm - rf mongodbbook.tar.gz [[email protected] ~]$ sudo /usr/local/mongodb/bin/ mongofiles get mongodbbook.tar.gzconnected to: 127.0.0.1done write to: mongodbbook.tar.gz[[email protected] ~]$ ll mongobook.tar.gzls: Unable to access mongobook.tar.gz: without that file or directory [[email protected] ~]$ md5sum ./mongodbbook.tar.gz 85c0c93f51ebe9c609ffe4f9da71c63e ./mongodbbook.tar.gz[[email protected] ~]$
MongoDB Advanced Series (--GRIDFS) large file MD5 authentication