Created
May 18, 2011 15:06
-
-
Save davidmfoley/978761 to your computer and use it in GitHub Desktop.
Drop all mongodb tmp collections
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
names = db.getCollectionNames(); for (var i = 0; i < names.length; i++) { if (names[i].substring(0,4) =='tmp.') { print(names[i]); db.getCollection(names[i]).drop(); }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment