Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Is there a need to have -r in gsutil cp cmd?

Hello, is there a need to have -r in gsutil cp command? It seems using "gsutil cp" already copies all objects from the old bucket to the new bucket.

1 Answers

Ah, the -r flag can let you copy the objects while preserving their subdirectory structure.  If you use **, you will "flatten" the structure.  Check out this gsutil cp documentation page for all the details. 🙂



Thank you!

Mattias Andersson

No problem! Happy to help! 🙂

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?