#MongoDB - Mongo Shell
###Single Task You can run commands in MongoDB from the command prompt by feeding the command into the mongo shell using:
mongo server1/admin --eval "db.runCommand({logRotate:1})"
mongo localhost:30000/admin --eval "db.runCommand({logRotate:1})"
This example will rotate the log file without remaining in the mongo shell. Note: admin refers to the admin database. Executing the command returns: