Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud storage 如何删除所有";。直营店;使用gsutil从Google云存储中获取文件_Google Cloud Storage_Gsutil - Fatal编程技术网

Google cloud storage 如何删除所有";。直营店;使用gsutil从Google云存储中获取文件

Google cloud storage 如何删除所有";。直营店;使用gsutil从Google云存储中获取文件,google-cloud-storage,gsutil,Google Cloud Storage,Gsutil,我以前做过一次gsutil rsync,其中包括很多我不想同步的“.DS_Store”文件。现在我想摆脱它们,但我似乎找不到一种方法 我认为有效的命令是: gsutil rm gs://my bucket/\*.DS\u Store\* 但是,在使用此命令时,我收到一个错误,说明“CommandException:没有匹配的URL:”。这应该可以做到: gsutil -m rm -r gs://my-bucket/**/.DS_Store 或者使用zsh gsutil -m rm -r 'gs

我以前做过一次gsutil rsync,其中包括很多我不想同步的“.DS_Store”文件。现在我想摆脱它们,但我似乎找不到一种方法

我认为有效的命令是:

gsutil rm gs://my bucket/\*.DS\u Store\*

但是,在使用此命令时,我收到一个错误,说明“CommandException:没有匹配的URL:”。

这应该可以做到:

gsutil -m rm -r gs://my-bucket/**/.DS_Store
或者使用zsh

gsutil -m rm -r 'gs://my-bucket/**/.DS_Store'

当我使用该命令时,我得到一个错误,声明
zsh:no matches found:gs://my bucket/**/.DS\u Store/*
(当然替换了我的bucket)。我已经检查过了,我肯定还有.DS_存储文件在存储中。zsh正在尝试向上扩展通配符,然后将其传递给gsutil。尝试将gs://my bucket/**/.DS_Store/*参数放在单引号中。当我这样做时,运行大约需要一分钟时间,只有光标可见,然后返回:
CommandException:没有匹配的URL:gs://my bucket/**/.DS_Store/*
我想您需要
gs://my bucket/**/.DS_Store
,因为它是一个文件,不是文件夹。Mateus Ribeiro您需要安装gsutil并从shell运行它。