Prequisties
Hardware : GCP
Google account
GCP buckets are used to store files and data’s which can be saved and it can access from cloud console. We can upload the files into bucket and we can use that data for our calculation purposes.
Open the Cloud Console
Click on Activate Cloud Shell

To create bucket
$ gsutil mb -l <location> gs:// <bucket-name>

Give the Authorization if asked.

To list the buckets
$ gsutil ls gs://

To list the contents in bucket
$ gsutil ls gs://<bucket-name>

List the details of the contents in a bucket
$ gsutil ls –l gs://<bucket-name>

To show the details of a file
$ gsutil ls -l gs://< bucket-name>/<file-name>

To remove file
$ gsutil rm gs://<bucket-name>/<file-name-with-extension>

To add Read permission for a file
$ gsutil acl ch -u AllUsers:R gs://< bucket-name>/<file-name-with-extension>

To add Owner permission for a file
$ gsutil acl ch -u AllUsers:O gs://< bucket-name>/<file-name-with-extension>

To remove permission in a file for all users
$ gsutil acl ch -d AllUsers gs://<bucket-name>/<file-name-with-extension>

To remove a file from a bucket
$ gsutil rm -r gs://<bucket-name> /<filename>

To remove bucket
$ gsutil rm -r gs://<bucket-name>

To create a bucket in another project
$ gsutil mb -p <project-name> -c <storage-class> -l <zone> on gs://<bucket-name>
