Warning: Undefined array key "HTTPS" in include() (line 29 of /opt/www/fdv2/drupal.stage/web/sites/default/settings.local.php).
include('/opt/www/fdv2/drupal.stage/web/sites/default/settings.local.php') (Line: 4)
require('/opt/www/fdv2/drupal.stage/web/sites/drupal001.net/settings.php') (Line: 145)
Drupal\Core\Site\Settings::initialize('/opt/www/fdv2/drupal.stage/web', 'sites/drupal001.net', Object) (Line: 1099)
Drupal\Core\DrupalKernel->initializeSettings(Object) (Line: 701)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
rsync脚本同步文件夹,如果不新建文件夹,而直接同步到目标文件夹? - Drupal大学 - Drupal问答论坛
首页 / 帖子
rsync脚本同步文件夹,如果不新建文件夹,而直接同步到目标文件夹?

rsync同步文件夹的时候,总是会在目标文件夹里面新建一个文件夹,如何能不新建,同步的文件夹和目标文件夹是一个文件夹?

谢谢!

1个答案
YOYO
发布于:2016-08-29 18:10

rsync的source 中,带斜线和不带斜线,是不一样的。target 斜线有没有没关系。

rsync  source target
rsync  source/ target


如果不想让 source 在 target 里面新建一个目录,那么不要带 / 。

另外还要注意文件名字。
http://defindit.com/readme_files/rsync_backup.html