Questions tagged [gsutil]

gsutil is a command-line program that allows you to store, share and manage data hosted at cloud-based storage providers.

gsutil allows you to store, share and manage data hosted at cloud-based storage providers. It provides a simple Unix shell command-like syntax, operating over buckets and objects named with a URIs and wildcards.

868 questions
-1
votes
2 answers

Delete multiple files(objects) listed in a ".txt" file with "gsutil" (GCS)

I could delete the 3 files(objects), "apple.jpg", "orange.png" and "kiwi.gif" on GCS with the "gsutil" command below on Cloud Shell: (Hint: gs:///) gsutil rm gs://test.com/apple.jpg gs://test.com/orange.png…
-1
votes
1 answer

Counting objects in folders in a bucket

Trying to count objects inside every folder inside the bucket (1 layer only) Here is what i tried: chcp 65001 Foreach($v in gsutil ls "gs://bucket/*"){ echo $v (gsutil ls $v).Length } It works fine at first, but there are 2 cases that cause…
ssit
  • 1
  • 1
-1
votes
1 answer

GCP GSUtil executable location

Working with the GCP Google CLI, specifically the "cp" method to copy files. I need to call it programatically, but can't find the executable to invoke. Due to limitations in the project, really don't want to call cmd.exe and pass an arg to it like…
-1
votes
1 answer

GCP Storage Bucket Transfers (gsutil)

I'm trying to move 15 million files (4TB) from various buckets using gsutil mv. Unfortunately, the previous file names do not share any common prefixes; instead they're all postfixed with our "filetype" identifiers. During this transfer, I'm…
lukeed
  • 409
  • 2
  • 5
  • 13
-1
votes
1 answer

gsutil in Python throws Syntax error

Share python script which uses gsutil to download a file from google cloud storage bucket. I am facing an issue while using gsutil Python scripts throws Syntax error : Invalid Syntax
-1
votes
1 answer

gsutil error "ImportError: cannot import name constants" i can't fix

I'm trying to use the gsutil command to download files from gs bucket. This is being down from a Google Cloud VM Instance and it was working for me until friday when it stopped working, without any changes on my side. The OS is CentOS 6 for whatever…
-2
votes
1 answer

BigQuery Client Url

My server is a closed-network and i want to make a whitelist only for bigquery client and gsutil. I have tried adding following url https://cloud.google.com/bigquery https://console.cloud.google.com/ But it turns out bigquery needs a little…
ariq hadi
  • 3
  • 1
-2
votes
1 answer

gsutil cp from cloud storage to remote windows machine

I'm struggling to use gsutil cp command to copy some files from cloud storage to a Windows Server machine. I cannot execute the command inside the Windows machine because this copy process is part of a dag in Airflow, and the Airflow machine should…
Giorge Caique
  • 199
  • 1
  • 1
  • 16
-2
votes
1 answer

gsutil BadRequestException 400 None

i have a request to copy files from AWS S3 bucket to GCS storage with the following command: gsutil -m cp -r ${sourceURL} ${destinationURL} howver, i encountered an error BadRequestException: 400 None and the error message followed…
Alice_Bear
  • 11
  • 1
-2
votes
3 answers

Gsutil copy/move files in batches

Is there a way to copy or move files using gsutil command in batches? For example If I want to copy 100 files from given folder to another.
user101010
  • 97
  • 3
  • 10
-2
votes
1 answer

Is there any command that I can use gsutil rm to delete the old versions?

I am learning how to use google cloud I used this command: "gsutil ls -la gs://bucket01/*" And I get the follow information: display.json#01 display.json#02 display.json#03 display.json#04 display.json#05 How can I delete all the previous version…
-5
votes
1 answer

Need to write a shell script for transferring files to GCS bucket using gsutil. but don't know completely how to write it. Please tell from start

#!/bin/bash gsutil -m cp -r dir gs://my-bucket I write this code for transferring files from machine to GCS bucket..but I think I need to configure project and service account...please tell me the code for this.
1 2 3
57
58