Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

95 lines (93 sloc) 2.156 kb
.TH MONGOFILES "1" "June 2009" "10gen" "Mongo Database"
mongofiles \- a simple GridFS interface
\fBmongofiles [\fIOPTIONS\fR] \fICOMMAND\fR \fIFILENAME\fR\fR
is used to list, get, and insert files in the database.
.B list
list all files. FILENAME is an optional prefix which listed filenames
must begin with.
.B search
search all files. FILENAME is a substring which listed
filenames must contain.
.B put
add a file with filename FILENAME
.B get
get a file with filename FILENAME
.B delete
delete all files with filename FILENAME
.B mongofiles list
lists files in test.fs.files
.B mongofiles put README.txt
inserts the file README.txt into the collection test.fs.files
.B mongofiles get photo.jpg
retrieves photo.jpg from test.fs.files and saves it locally
.B \-\-help
show usage information
.B \-\-version
show version information
.B \-v, \-\-verbose
be more verbose (include multiple times for more verbosity
e.g. \-vvvvv)
.B \-h, \-\-host HOST
server to connect to (default HOST=localhost)
.B\-\-port arg
server port. Can also use \-\-host hostname:port
.B \-\-ipv6
enable IPv6 support (disabled by default)
.B \-u|\-\-username USERNAME
specify user to log in as
.B \-p|\-\-password PASSWORD
specify password of user
.B \-\-dbpath PATH
directly access mongod data files in this path, instead of connecting to a mongod instance
.B \-\-directoryperdb
if dbpath specified, each db is in a separate directory
.B \-d, \-\-db DATABASE
database to use
.B \-c, \-\-c COLLECTION
collection to use (some commands, default COLLECTION=fs.files)
.B \-l, \-\-local FILENAME
local filename for put|get (default is to use the same name as the
.B \-t, \-\-type arg
MIME type for put (default is to omit)
.B \-r, \-\-replace
Remove other files with the same name after PUT
Copyright 2007\-2011 10gen
For more information, please refer to the MongoDB wiki, available at
Kristina Chodorow
Jump to Line
Something went wrong with that request. Please try again.