0
votes

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.

1

1 Answers

2
votes

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}}'