google-cloud-platform - `gsutlis ls` 无法显示存储桶列表
问题描述
我有 2 台 Mac 笔记本电脑。在这个问题中,我称它们为“MacA(工作正常)”和“MacB(奇怪的行为)”。
MacB发生了什么?
结果
gsutils ls
玛卡(工作正常)
$ gsutil ls gs://bucket-a gs://bucket-b gs://bucket-c
MacB(奇怪的行为)
$ gsutil ls CommandException: Incorrect option(s) specified. Usage: gsutil ls [-a] [-b] [-d] [-l] [-L] [-r] [-p proj_id] url... For additional help run: gsutil help ls
结果
gsutls help ls
玛卡(工作正常)
$ gsutil help ls NAME ls - List providers, buckets, or objects SYNOPSIS gsutil ls [-a] [-b] [-d] [-l] [-L] [-r] [-p proj_id] url... LISTING PROVIDERS, BUCKETS, SUBDIRECTORIES, AND OBJECTS If you run gsutil ls without URLs, it lists all of the Google Cloud Storage buckets under your default project ID (or all of the Cloud Storage buckets under the project you specify with the -p flag): gsutil ls If you specify one or more provider URLs, gsutil ls lists buckets at each listed provider: ......
MacB(奇怪的行为)
$ gsutil help ls CommandException: The help command accepts at most 2 arguments. Usage: gsutil help [command or topic] For additional help run: gsutil help help
shasum ~/google-cloud-sdk/bin/gsutil
~/google-cloud-sdk/bin/gsutil 的校验和在 MacA 和 MacB 之间是相同的。
解决方案
我解决了这个问题。
我的 .zshrc 配置错误。我删除了-g
选项。
alias -g ls="ls -F -G"
↓</p>
alias ls="ls -F -G"
在我更改 .zshrc 之前,无意中gsutil ls
被替换为。gsutils ls -F -G
推荐阅读
- php - 登录成功后PHP重定向失败
- amazon-web-services - 如何在 CodePipeline 中限制 CodeBuild,使其仅在需要时构建?
- javascript - html输入文本“密码框”和按钮检查密码是否正确显示“OK”或“ERROR”
- symfony4 - 如何在 symfony 中管理角色
- javascript - 使用 express Validator 的 .equals() 进行验证
- google-bigquery - 在 Cloud Data Prep 中使用带有 BigQuery 参数的数据集?
- python - python ControlScripts/control.py /dev/tty.PathToUsbDevice - 找不到正确的路径
- c# - 在类中使用 bash/shell 替换布尔值
- sql - 在 Access 中运行预构建查询时出现语法错误 3075
- sql - 如何为一列提供其他两列的连接值?