On Wed, Jan 13, 2021 at 09:19:47PM +0800, Li Ping wrote:
[why] find a -type d a a/b a/c find a -type d -exec curl -sSf -X MKCOL "$http_url/{}" ; ==> curl: (22) The requested URL returned error: 409 Conflict reason: upload an empty folder causes this error.
I suspect 409 happens because server side already have that dir. It's like you run
mkdir a => success mkdir a => 409
But will the server side auto create new subdirs if they do not already exist? Probably the below find will fail.
Please experiment with deeper dirs, like a/b/c/file
Please be very careful and make sure you understand all the error messages, all situations and the root cause before going ahead changing something.
[how] find a -type f -exec curl -sSf -X MKCOL "$http_url/{}" ; a/b a/c All the files would be found, there is no need to upload empty folder.
Thanks, Fengguang