Reputation: 698
I have 4 files xxxxx.xlsx in this directory:
/var/tmp/dagxxxxx/2019-08-10/xxxxx.xlsx
I want to copy them over to:
gs://reports_dev/2019
Using gsutil cp -r the final gcs path should be like(with all 4 files):
gs://reports_dev/2019/2019-08-10/xxxxx.xlsx
I tried different combination of cp and -r like:
gsutil cp -r /var/tmp/dagxxxxx/2019-08-10/** gs://reports_dev/2019
but couldn't get the desired path in gcs.
Upvotes: 2
Views: 4448
Reputation: 1914
Remove the trailing Asterisks, -r
already means recursive, this should work:
gsutil cp -r /var/tmp/dagxxxxx/2019-08-10/ gs://reports_dev/2019
If you append a forward slash /
to your source, it will copy the folder to your destination, if you don't, it will copy the Content of your source to your destination.
Upvotes: 4