0
0
GCPcloud~30 mins

Storage commands (gsutil) in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Basic Storage Commands with gsutil
📖 Scenario: You are working as a cloud assistant helping a small company manage their files in Google Cloud Storage. You need to create a storage bucket, upload files, list the files, and finally delete the bucket when done.
🎯 Goal: Learn how to use basic gsutil commands to create a bucket, upload files, list files, and delete a bucket in Google Cloud Storage.
📋 What You'll Learn
Create a storage bucket named exactly my-test-bucket-12345
Upload a file named example.txt to the bucket
List the files inside the bucket
Delete the bucket after cleaning up
💡 Why This Matters
🌍 Real World
Cloud storage is used to keep files safe and accessible from anywhere. Knowing how to manage buckets and files with gsutil helps you organize and control your cloud data.
💼 Career
Many cloud jobs require managing storage resources. Knowing gsutil commands is a basic skill for cloud administrators and developers working with Google Cloud.
Progress0 / 4 steps
1
Create a storage bucket
Use the gsutil mb command to create a bucket named my-test-bucket-12345 in the default location.
GCP
Need a hint?

Remember, mb means 'make bucket'. The bucket name must start with gs://.

2
Upload a file to the bucket
Use the gsutil cp command to upload a file named example.txt from your local machine to the bucket my-test-bucket-12345.
GCP
Need a hint?

Use cp to copy files. The source is example.txt, the destination is the bucket URL.

3
List files in the bucket
Use the gsutil ls command to list all files inside the bucket my-test-bucket-12345.
GCP
Need a hint?

ls lists files. Use it with the bucket URL to see contents.

4
Delete the bucket
First, delete all files inside the bucket using gsutil rm, then delete the bucket itself using gsutil rb. Use the bucket name my-test-bucket-12345.
GCP
Need a hint?

Use rm with ** to delete all files, then rb to remove the bucket.