【发布时间】:2015-11-15 16:12:45
【问题描述】:
我有一个在/files/category/specific/* 上有文件的服务器。
在我的本地,我有一个 ~/files 目录。我想要做的是将/files/category/specific/* 拉到我的本地到~/files/something/whatever。但是something/whatever 不存在,我希望 rsync 也可以创建这些本地目录。
如何使用 rsync 做到这一点?
【问题讨论】:
-
mkdir -p ~/files/something/whatever && rsync -uai server:/files/category/specific/ ~/files/something/whateverrsync` 不会创建源主机上不存在的内容,specific之后的尾随/是必需的。
标签: shell unix terminal command-line-interface rsync