Reputation: 15151
I want to find files that size is less than 10k in google cloud storage.
gsutil ls -l gs://my-bucket/
This gsutil
command shows list of files with sizes.
Is there a option for filtering the list by file size?
I'll write a script for it, if there is no default option is provided.
Upvotes: 0
Views: 2381
Reputation: 12145
gsutil ls doesn't support filtering by size. You could do it with a script like this:
gsutil ls -l gs://your-bucket | awk '/gs:\/\// {if ($1 > 10000) {print $NF}}'
Upvotes: 2