GridFS is available from the command line via the mongofiles utility. The generic syntax is as follows:
mongofiles <options> <commands> <filename>
Most of the options are identical to those of the mongo shell and include command-line flags to identify a URI style connection string, host, port, and authentication information. You can also specify the IP version (for example, --ipv6) and SSL/TLS secure connectivity options.Â
The complete list of options is found here: https://docs.mongodb.com/manual/reference/program/mongofiles/#options. For more information on options, please review the subsection entitled Mongo Shell Command Line Switches in Chapter 3, Essential MongoDB Administration Techniques.