Object transferGoogle Cloud Storage
gsutil cp
Copy files between local paths and GCS buckets.
gsutil cp <local_file> gs://<bucket>/<object>
Bucket management, IAM, lifecycle policies, and metadata inspection.
Copy files between local paths and GCS buckets.
gsutil cp <local_file> gs://<bucket>/<object>
Synchronize directory contents between local storage and buckets.
gsutil -m rsync -r <local_dir> gs://<bucket>/<prefix>
gsutil rb
Create or remove buckets in specified regions.
gsutil mb -l <region> gs://<bucket>
List buckets or objects with optional filtering.
gsutil ls
Configure lifecycle management policies for automatic object transitions.
gsutil lifecycle set lifecycle.json gs://<bucket>
gsutil iam get
Manage IAM policies for buckets.
gsutil iam ch user:<email>:objectViewer gs://<bucket>
gsutil acl ch
Adjust legacy ACLs for fine-grained object access.
gsutil acl ch -u <email>:READ gs://<bucket>/<object>
Retrieve metadata for objects or buckets.
gsutil stat gs://<bucket>/<object>
Enable or disable object versioning on buckets.
gsutil versioning set on gs://<bucket>
Measure object storage usage per prefix.
gsutil du -sh gs://<bucket>/<prefix>