The mongofiles tools has a few deficiencies:
- the collection parameter is ignored
- it makes implicit assumptions about collection suffix (".fs")
- it does not properly delete chunks on replacing a file, but only the meta data, in the worst case it can even delete chunks of an unrelated file
- the chunk size cannot be specified, it only ever uses the default size
A patch set fixing these issues has been submitted as Github pull request #471 which fixes all of these issues.
Related bugs which describe one or another of these problems:
As per request in the pull request I'm opening up a new ticket describing the pull request as a whole.