Skip to content

Instantly share code, notes, and snippets.

@danielgwood
Created September 27, 2011 12:07
Show Gist options
  • Save danielgwood/1244903 to your computer and use it in GitHub Desktop.
Save danielgwood/1244903 to your computer and use it in GitHub Desktop.
MongoDB shell cheatsheet
// A bunch of functions you can use in the MongoDB shell
// taken from http://api.mongodb.org/js/1.8.2/index.html
// amongst other sources
// Used in place of print() to view the contents of objects
printjson(x);
printjsononeline(x);
// File system interaction
ls(...);
pwd();
cd(...);
removeFile(...);
mkdir(...);
// Misc
hex_md5('foo');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment