gsutil / gcloud storage file listing sorted date descending?

前端 未结 2 677
遇见更好的自我
遇见更好的自我 2021-02-18 13:41

Is there no way to get a file listing out from a Google Cloud Storage bucket that is sorted by date descending? This is very frustrating. I need to check the status of

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-18 14:18

    I use this as a workaround:

    gsutil ls -l gs://[bucket-name]/ | sort -k 2
    

    This outputs full listing including date as the second field, sort -k 2 then sorts by this field.

提交回复
热议问题