Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"metadata": {},
"outputs": [],
"source": [
"!gsutil mb gs://$BUCKET_NAME/"
"!gcloud storage buckets create gs://$BUCKET_NAME"
]
},
{
Expand Down Expand Up @@ -377,7 +377,7 @@
"metadata": {},
"outputs": [],
"source": [
"!gsutil ls gs://$BUCKET_NAME/"
"!gcloud storage ls gs://$BUCKET_NAME/"
]
},
{
Expand Down Expand Up @@ -539,7 +539,7 @@
"!gcloud ai-platform models delete $MODEL_NAME --quiet\n",
"\n",
"# Delete the bucket and contents\n",
"!gsutil rm -r gs://$BUCKET_NAME\n",
"!gcloud storage rm --recursive gs://$BUCKET_NAME\n",
"\n",
"# Delete the local files created by the tutorial\n",
"!rm -rf census_training"
Expand Down
19 changes: 10 additions & 9 deletions notebooks/tutorials/storage/Storage command-line tool.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
"outputs": [],
"source": [
"# ERROR: A migration for this command is not implemented. Please refer to the migration guide.\n",
"!gsutil help"
]
},
Expand Down Expand Up @@ -67,7 +68,7 @@
"metadata": {},
"outputs": [],
"source": [
"!gsutil mb gs://{bucket_name}/"
"!gcloud storage buckets create gs://{bucket_name}/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The gcloud storage buckets create command does not accept a trailing slash in the bucket URL. This will cause the command to fail. Please remove the trailing slash.

Note that the automated migration handled this correctly in notebooks/tutorials/cloud-ml-engine/Training and prediction with scikit-learn.ipynb, but was inconsistent here.

Suggested change
"!gcloud storage buckets create gs://{bucket_name}/"
"!gcloud storage buckets create gs://{bucket_name}"

]
},
{
Expand Down Expand Up @@ -95,7 +96,7 @@
"metadata": {},
"outputs": [],
"source": [
"!gsutil ls -p $project_id"
"!gcloud storage ls --project $project_id"
]
},
{
Expand Down Expand Up @@ -128,7 +129,7 @@
},
"outputs": [],
"source": [
"!gsutil ls -L -b gs://{bucket_name}/"
"!gcloud storage ls --full --buckets gs://{bucket_name}/"
]
},
{
Expand Down Expand Up @@ -163,7 +164,7 @@
"metadata": {},
"outputs": [],
"source": [
"!gsutil cp resources/us-states.txt gs://{bucket_name}/"
"!gcloud storage cp resources/us-states.txt gs://{bucket_name}/"
]
},
{
Expand All @@ -181,7 +182,7 @@
},
"outputs": [],
"source": [
"!gsutil ls -r gs://{bucket_name}/**"
"!gcloud storage ls --recursive gs://{bucket_name}/**"
]
},
{
Expand Down Expand Up @@ -209,7 +210,7 @@
"metadata": {},
"outputs": [],
"source": [
"!gsutil ls -L gs://{bucket_name}/us-states.txt"
"!gcloud storage ls --full gs://{bucket_name}/us-states.txt"
]
},
{
Expand Down Expand Up @@ -245,7 +246,7 @@
},
"outputs": [],
"source": [
"!gsutil cp gs://{bucket_name}/us-states.txt resources/downloaded-us-states.txt"
"!gcloud storage cp gs://{bucket_name}/us-states.txt resources/downloaded-us-states.txt"
]
},
{
Expand All @@ -270,7 +271,7 @@
},
"outputs": [],
"source": [
"!gsutil rm gs://{bucket_name}/us-states.txt"
"!gcloud storage rm gs://{bucket_name}/us-states.txt"
]
},
{
Expand All @@ -288,7 +289,7 @@
"metadata": {},
"outputs": [],
"source": [
"!gsutil rm -r gs://{bucket_name}/"
"!gcloud storage rm --recursive gs://{bucket_name}/"
]
},
{
Expand Down