
mongoexport
List of commands for mongoexport:
-
mongoexport:help mongoexport: Display help.$ mongoexport --helptry on your machineexplain this command
-
mongoexport:tldr:4329d mongoexport: Export a collection to `stdout`, formatted as JSON.$ mongoexport --uri=${connection_string} --collection=${collection_name}try on your machineexplain this command
-
mongoexport:tldr:4f3ae mongoexport: Export documents that match the query in the specified file to a CSV file, omitting the list of field names on the first line.$ mongoexport --collection=${collection_name} --type=${csv} --fields="${field1,field2,---}" --queryFile=${filename} --noHeaderLine --out=${filename-csv}try on your machineexplain this command
-
mongoexport:tldr:5178f mongoexport: Export documents as a JSON array instead of one object per line.$ mongoexport --collection=${collection_name} --jsonArraytry on your machineexplain this command
-
mongoexport:tldr:aacdc mongoexport: Export the documents in the specified collection that match a query to a JSON file.$ mongoexport --db=${database_name} --collection=${collection_name} --query="${query_object}" --out=${filename-json}try on your machineexplain this command
-
mongoexport:tldr:b0df1 mongoexport: Export documents to a CSV file.$ mongoexport --collection=${collection_name} --type=${csv} --fields="${field1,field2,---}" --out=${filename-csv}try on your machineexplain this command
-
mongoexport:tldr:e23ae mongoexport: Export documents to `stdout`, formatted as human-readable JSON.$ mongoexport --uri=${mongodb_uri} --collection=${collection_name} --prettytry on your machineexplain this command