Database Reference
In-Depth Information
File storage (GridFS) tools
With the help of GridFS, MongoDB can be used as a filesystem. The processes in this sec-
tion are used to manage and control the GridFS feature.
There is one process in this category, which is as follows:
•
mongofiles
Understanding mongofiles
This utility enables developers to retrieve files that are stored in the database in the GridFS
collection. The
mongofiles
utility come in handy when developers need to interact with
files stored in the database from the command-line environment.
The usage of this command looks like the following:
mongofiles <options> <commands> <filename>
The following example is a simple usage of this utility:
mongofiles -d mydb list
The preceding command line will retrieve all files in the GridFS collection from the
mydb
database.
Note
For more information on
mongofiles
, please visit the MongoDB documentation page at