feat: allow to list objects sorted by size#5262
Conversation
|
I'm waiting for initial feature approval before adding tests/making a PR to the docs repo |
klauspost
left a comment
There was a problem hiding this comment.
Still not sure it should be there. But leaving for others to decide.
|
@shtripat @harshavardhana Hello ! Would it be possible to review this PR please ? Thank you |
|
I am confused about the value add of this feature. If we really need such a thing, we can use |
|
We could do that, but but the |
IIUC this kind of sorting is needed when we are programmatically processing the output and |
|
My use case was "I want to see what the biggest files are in this bucket" (not in the context of a script, purely me out of curiosity)
Ok ! |
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.
Description & context
Add a
--sort=sizeoption tomcli lsto be able to sort files by sizeUsually, you would do that by piping to
sort, or using the--sortflag of lsHow to test this PR?
Compare
go run . ls <path>andgo run . ls <path> --sort=sizeTypes of changes
Checklist:
commit-idorPR #here)