gsutil

gsutil is part of Google Cloud SDK allow you to work with Google Cloud Storage.

Configure

Before you can use gsutil, run

You will be given a special URL, open the link in browser, login to your google cloud account. Then you get a code, copy and paste it in terminal.

Now you are authenticated. Next you need to tell gcloud which project to use by running

Google Cloud

Create a Bucket

List all Buckets

To sync everything in a folder

-r == recursively.

Everything inside /path/to/folder/ will be synced to specified bucket. To speed up, you can use -m option.

To list all files in a bucket, run

To copy files to a bucket, run

Google Cloud Storage

Google Cloud