This is used for copying or uploading files, for example.
For details about options, see the gcloud CLI documentation.
-
List buckets and objects
-
Copy objects
- Syntax
-
gsutil cp <source> <target> [-options]
- Example
-
The following example copies a file (test.txt) from your bucket (my-sdsc-bucket) to your current working directory.
gsutil cp gs://my-sdsc-bucket/test.txt .
The following example copies a file (test2.txt) to your bucket (my-sdsc-bucket).
gsutil cp test2.txt gs://my-sdsc-bucket