Open boraberke opened 1 month ago
When mv is used to move a file between buckets, it behaves differently depending on whether a subfolder with the same name exists.
mv
test-bucket
test-bucket-2
touch 12345.txt
gsutil cp 12345.txt gs://test-bucket/folder/nested_folder/aaaa/bbbb/cccc/12345.txt
gsutil -m mv gs://test-bucket/folder/nested_folder gs://test-bucket-2/folder/nested_folder
gsutil ls "gs://test-bucket-2/folder/nested_folder/**"
First Output should be as follows:
gs://test-bucket-2/folder/nested_folder/aaaa/bbbb/cccc/12345.txt
step 5
nested_folder
gs://test-bucket-2/folder/nested_folder/aaaa/bbbb/cccc/12345.txt gs://test-bucket-2/folder/nested_folder/nested_folder/aaaa/bbbb/cccc/12345.txt
I am not sure if this is an expected behavior but same command producing two different results depending on the bucket structure does not feel right.
When
mv
is used to move a file between buckets, it behaves differently depending on whether a subfolder with the same name exists.Reproducing steps
test-bucket
andtest-bucket-2
.test-bucket
with the following subfolders.test-bucket-2
.test-bucket-2
.First Output should be as follows:
step 5
included a secondarynested_folder
in it.I am not sure if this is an expected behavior but same command producing two different results depending on the bucket structure does not feel right.