gsutil commands Flashcards

1
Q

What command can you use to see the buckets in your current project?

A

gsutil ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the command you could use to make a new bucket?

A

gsutil mb

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What you make a new bucket using gsutil, what should the bucket name be preceded by?

A

gs://

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What command would you use to get a JSON response of the lables in any particular bucket?

A

gsutil label get gs://

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

After redirecting the labels output of a bucket to a file, how can you use it to apply the same labels to a different bucket?

A

gsutil label set .json gs://

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the command you would use to add additional labels to a bucket?

A

gsutil label set -l “key:value” gs://

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the command you would use to see if versioning is turned on for a particular bucket?

A

gsutil versioning get gs://

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the command you would use to set versioning on a particular bucket?

A

gsutil versioning set on gs://

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the command you would use to copy an object from one bucket to another?

A

gsutil cp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the command you would run to see information about archived (versioning) objects within a bucket?

A

gsutil ls -a gs://

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When viewing a versioned object in the command line, what is the name of the number that is appended to versioned (archived) objects?

A

This is a generation number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When you delete a versioned (archived) object, is it gone forever?

A

No, the file itself is gone, but the versioned object is still there an can be restored

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What command would you run to copy all of the objects within a bucket to another bucket?

A

gsutil cp gs:///** gs://

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the command you would run to remove a file from a bucket?

A

gsutil rm gs://bucket/or/file/name/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When you copy objects using the command line, are the sharing settings of that object also copied?

A

No, it depends on the bucket permissions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the command you would run in order to share a file in another bucket?

A

gsutil acl ch -u gs://

Example: gsutil acl ch -u allUsers:R gs://tlg-storage-lab-cli/DarkPoster.png