What's the easiest way to do this from my bash prompt?
I know that I can drop a database using below:
mongo <dbname> --eval "db.dropDatabase()"
I want to do the same for a collection preferably in a shell script or python script and not from mongodb console.
What I am trying to achieve is first take a mongodump
of the collection and then drop
the collection:
Command I am using for dump:
mongodump --db database --collection collection_03-11-2016 --out /home/mongodump