rsync - create all missing parent directories?

前端 未结 7 1442
一个人的身影
一个人的身影 2020-12-29 01:32

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

7条回答
  •  囚心锁ツ
    2020-12-29 01:41

    --relative does not work for me since I had different setup. Maybe I just didn't understood how --relative works, but I found that the

    ssh remote mkdir -p /top/a/b/c
    rsync /top/a/b/c/d remote:/top/a/b/c
    

    is easy to understand and does the job.

提交回复
热议问题