I\'m looking for an rsync
-like program which will create any missing parent directories on the remote side.
For example, if I have /top/a/b/c/d
According to https://unix.stackexchange.com/a/496181/5783, since rsync 2.6.7, --relative
works if you use .
to anchor the starting parent directory to create at the destination:
derek@DESKTOP-2F2F59O:~/projects/rsync$ mkdir --parents top1/a/b/c/d
derek@DESKTOP-2F2F59O:~/projects/rsync$ mkdir --parents top2/a
derek@DESKTOP-2F2F59O:~/projects/rsync$ rsync --recursive --relative --verbose top1/a/./b/c/d top2/a/
sending incremental file list
b/
b/c/
b/c/d/
sent 99 bytes received 28 bytes 254.00 bytes/sec
total size is 0 speedup is 0.00