zoukankan      html  css  js  c++  java
  • rsync同步报错cannot delete non-empty directory的问题

    # rsync同步报错,目录不为空不能删除的问题
    # rsync -zavP --password-file="/data/www/.rsync/rsyncd.aliszdownload" --exclude=cbs_down --delete /data/www/vhosts/download.chinasoft.com/httpdocs/ apache@1.1.1.1::apache/data/www/vhosts/download.chinasoft.com/httpdocs/

    cannot delete non-empty directory: data/www/vhosts/download.chinasoft.com/httpdocs
    cannot delete non-empty directory: data/www/vhosts/download.chinasoft.com/httpdocs
    cannot delete non-empty directory: data/www/vhosts/download.chinasoft.com
    cannot delete non-empty directory: data/www/vhosts/download.chinasoft.com
    cannot delete non-empty directory: data/www/vhosts
    cannot delete non-empty directory: data/www/vhosts
    cannot delete non-empty directory: data/www

    --delete-excluded

    # 可以加上参数 --delete-excluded 就可以删除了

    [root@download-web01:~]# rsync -zavP --password-file="/data/www/.rsync/rsyncd.aliszdownload" --exclude=cbs_down --delete --delete-excluded /data/www/vhosts/download.chinasoft.com/httpdocs/ apache@1.1.1.1::apache/data/www/vhosts/download.chinasoft.com/httpdocs/
    sending incremental file list
    deleting cbs_down
    deleting data/www/vhosts/download.chinasoft.com/httpdocs/cbs_down
    deleting data/www/vhosts/download.chinasoft.com/httpdocs/
    deleting data/www/vhosts/download.chinasoft.com/
    deleting data/www/vhosts/
    deleting data/www/
    developer/
    developer/12.5.zip
          2,660,463 100%    7.02MB/s    0:00:00 (xfr#1, ir-chk=1020/5507)

    sent 2,883,387 bytes  received 634 bytes  824,006.00 bytes/sec
    total size is 264,107,857,202  speedup is 91,576.26

  • 相关阅读:
    LINQ基础——WHERE子句
    LINQ基础——LET子句
    LINQ基础——FROM子句
    Guid(全局统一标识符)
    ??运算符
    多线程的AutoResetEvent
    线程池(ThreadPool)
    Mutex
    Monitor类实现线程同步
    【java框架】MyBatis(7)--MyBatis注解开发
  • 原文地址:https://www.cnblogs.com/reblue520/p/14184848.html
Copyright © 2011-2022 走看看