gcloud and gsutil

Install Google Cloud CLI if your are using any linux On on any Cloud Instance. If you are using a Google Compute Engine instance, then you already have gsutil installed. gsutil is a Python application that lets you access Cloud Storage from the command line. You can use gsutil to do a wide range of bucket and object management tasks, including: Creating and deleting buckets.

P
Prem Mohan Tyagi
1 min | 145 words
gcloud and gsutil
https://cloud.google.com/sdk/docs/downloads-interactive#linux-mac
First install the gcloud sdk
1. curl https://sdk.cloud.google.com | bash 2. Restart your shell 3. gcloud init you will get the command from server what you need to run on you local system to get the string(command) that string you have to use on server then we will get Authenticated Check auth list____________________________________
gcloud auth list Revoke auth List___________________________________
gcloud auth revoke List all buckets___________________________________
gcloud alpha storage ls --project=fishcon Configure the project______________________________
gcloud config set projectid Copy file to GCS-Bucket____________________________
gsutil cp test.txt gs://bucker-test
gsutil cp gs://bucket-test/test.pdf gs://bucket-testnew
gsutil cp local-location/filename gs://bucketname/
gsutil cp -r folder-name gs://bucketname/
gsutil -m cp -r folder-name gs://bucketname
gsutil cp gs://bucketname/filename local-location
gsutil cp -r gs://bucketname/folder-name local-location
gsutil -m cp -r gs://bucketname/folder-name local-location

Share this article

P

Written by

Prem Mohan Tyagi