【问题标题】:With gsutil tool, is possible to list files where the filename matches a regex?使用 gsutil 工具,可以列出文件名与正则表达式匹配的文件吗?
【发布时间】:2013-07-25 10:44:57
【问题描述】:

我想列出不以特定前缀开头的文件。我可以很好地列出它们,如下所示:

gsutil ls gs://my_bucket/my_prefix*

我该如何反其道而行之?

【问题讨论】:

    标签: gsutil


    【解决方案1】:

    执行您所说的唯一方法是列出存储桶并在本地计算机上过滤结果,例如,

    gsutil ls gs://mybucket/** | grep -v gs://my_bucket/my_prefix

    【讨论】:

      猜你喜欢
      • 2020-09-13
      • 1970-01-01
      • 1970-01-01
      • 2020-10-09
      • 1970-01-01
      • 2015-02-18
      相关资源
      最近更新 更多