gsutil Command Examples

Access Google Cloud Storage. You can use gsutil to do a wide range of bucket and object management tasks. More information: https://cloud.google.com/storage/docs/gsutil.

gsutil ls

gsutil ls -r 'gs://{{bucket_name}}/{{prefix}}**'

gsutil cp gs://{{bucket_name}}/{{object_name}} {{path/to/save_location}}

gsutil cp {{object_location}} gs://{{destination_bucket_name}}/

gsutil mv gs://{{bucket_name}}/{{old_object_name}} gs://{{bucket_name}}/{{new_object_name}}

gsutil mb gs://{{bucket_name}}

gsutil rm -r gs://{{bucket_name}}