mongofiles(1) - Linux man page
Name
mongofiles - a simple GridFS interface
Synopsis
mongofiles [OPTIONS] COMMAND FILENAME
Description
mongofiles is used to list, get, and insert files in the database.
- Commands:
- list
list all files. FILENAME is an optional prefix which listed filenames must begin with.
search
search all files. FILENAME is a substring which listed filenames must contain.
put
add a file with filename FILENAME
get
get a file with filename FILENAME
delete
delete all files with filename FILENAME
- list
Examples
mongofiles list
- lists files in test.fs.files
- mongofiles put README.txt
- inserts the file README.txt into the collection test.fs.files
- mongofiles get photo.jpg
- retrieves photo.jpg from test.fs.files and saves it locally
Options
- --help
show usage information
- --version
- show version information
- -v, --verbose
- be more verbose (include multiple times for more verbosity e.g. -vvvvv)
- -h, --host HOST
- server to connect to (default HOST=localhost)
- -port arg
- server port. Can also use --host hostname:port
- --ipv6
enable IPv6 support (disabled by default)
- -u|--username USERNAME
- specify user to log in as
- -p|--password PASSWORD
- specify password of user
- --dbpath PATH
- directly access mongod data files in this path, instead of connecting to a mongod instance
- --directoryperdb
- if dbpath specified, each db is in a separate directory
- -d, --db DATABASE
- database to use
- -c, --c COLLECTION
- collection to use (some commands, default COLLECTION=fs.files)
- -l, --local FILENAME
- local filename for put|get (default is to use the same name as the FILENAME)
- -t, --type arg
- MIME type for put (default is to omit)
- -r, --replace
- Remove other files with the same name after PUT
Copyright
Copyright 2007-2011 10gen
See Also
For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
Author
Kristina Chodorow