What command should you use to upload files from an on-premises virtual machine to Google Cloud Storage?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Prepare for the Google Cloud Professional Cloud Developer Test. Benefit from mock assessments featuring flashcards and multiple-choice format, each furnished with hints and detailed explanations. Excel in your exam with confidence!

The command you should use to upload files from an on-premises virtual machine to Google Cloud Storage is specifically designed for file manipulation within Google Cloud. The gsutil utility is part of the Google Cloud SDK and is specifically tailored for managing Cloud Storage. The correct command format with gsutil cp allows users to copy local files from a computing environment directly to a specified Cloud Storage bucket.

When you use the cp command with gsutil, you are invoking a command optimized for copying files and handling data transfer efficiently between your local environment and Cloud Storage. The syntax, gsutil cp [LOCAL_OBJECT] gs://[DESTINATION_BUCKET_NAME]/, clearly designates the source file on your local system and the destination bucket in the Cloud Storage, facilitating a straightforward and intuitive operation.

In contrast, other utility commands or tools mentioned in the options, such as gcloud cp, hadoop fs cp, and gcloud dataproc cp, are not designed for directly uploading files to Google Cloud Storage in the same context, leading to the conclusion that these would not be suitable for this specific operation.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy