12 sept. 2021, 08:53 de l0f...@tuta.io: > 12 sept. 2021, 03:45 de rich...@walnut.gen.nz: > >> # actually not necessary? rsync will create it >> mkdir -p mysite_test/doc_root >> > You can make a simple test to know that but I would say that rsync doesn't > create your destination "root" directory (the one you specify on the command > line) unless `--mkpath` is used. > Actually, I've just did some tests and it appears that rsync creates the destination folder if its parent already exists and if you have the right permissions.
For example ("my" and "dest" don't exist yet): rsync -a src/ dest => "dest" is created rsync -a src/ my/dest => error, "my" and "dest" don't exist (and are not created then) rsync --mkpath -a src/ my/dest => "my" and "dest" are created l0f4r0