更新时间:2023-11-12 12:00:52
将参数放在引号中应该会有所帮助.我刚刚使用 Google Cloud Shell 终端 尝试了以下命令,效果很好:
Putting the argument into quotes should help. I just tried the commands below using Google Cloud Shell terminal and it worked fine:
$ gsutil mb gs://my-test-bucket-55创建 gs://my-test-bucket-55/...$回声你好世界">测试文件.txt"$ gsutil cp "测试文件.txt" "gs://my-test-bucket-55/test file.txt"正在复制 file://test file.txt [Content-Type=text/plain]...上传 gs://my-test-bucket-55/test file.txt: 12 B/12 B$ gsutil cat "gs://my-test-bucket-55/test file.txt"你好世界
也就是说,如果可以的话,我会避免使用带有空格的文件名.
That said, I'd avoid file names with spaces if I could.