I've done a gsutil rsync before, which included a lot of ".DS_Store" files that I didn't want to sync. Now I would like to get rid of them, but I can't seem to find a way of doing that.
The command I though would work is:
gsutil rm gs://my-bucket/\*.DS_Store\*
However, I'm getting an error stating "CommandException: No URLs matched:" when using this.
This should do it:
gsutil -m rm -r gs://my-bucket/**/.DS_Store
Or with zsh
gsutil -m rm -r 'gs://my-bucket/**/.DS_Store'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With