New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add "limit" option to "ls" and "la" commands to return the specified number of objects instead of returning all objects. #757
Conversation
@mozawa Thank you for your contribution, I think that the idea is good. |
@fviard Thank you for the comment. You mean its better for the option to use "--limit" rather than "--max-ls-keys"? If you have any recommended option name, please let me know and I will change it. |
Yes, I think that "--limit" instead of "--max-ls-keys" will more understandable and reusable. |
@fviard Thanks. I made changes. |
@fviard I changed my mind a little bit. For my current changes, "ls" and "la" commands still will return all objects in the bucket even if the bucket is huge(e.g. millions of objects in the bucket) as default. This also could make the S3 server overloaded. So I'm going to change as follows.
What do you think? |
Hi @mozawa : I'm sorry for the big delay for my reply. (Probably my holidays are to blame).
|
number of objects instead of returning all objects in the bucket.
@fviard Thank you for the advice. I made some changes based on your suggestion. Please review this again. Thanks! |
Merged, thank you very much! |
@fviard Thank you. BTW, I'd like to know when will the next official release including this change be? The latest is 1.6.1 which was released on 2016-01-20 I guess. |
@mozawa Time past fast ;-) There could be a new release soon, but I still would like to have 1 or 2 issues resolved before. |
Currently "ls" command returns all objects within a bucket under a certain prefix using the delimiter '/' and there seems to be no option to limit the number of returned objects. If the contents of the main folder or a sub-folder is huge, it will continue to list all objects until it finishes. Its possible to take time to finish it and it could be overloaded the S3 server side.
This change is to add "max-ls-keys" option to "ls" command to return the specified number of objects instead of returning all objects.