rsync 只同步目录结构不同步文件的方法
If you are using an older rsync version, try:
代码如下:
rsync -av --include='*/' --exclude='*' /path/to/src /path/to/dest/ rsync -av --include='*/' --exclude='*' /path/to/apache/logs/ [email protected]:/path/to/apache/logs/ # cd /var/log/apache/ # rsync -av -f"+ */" -f"- *" . [email protected]:/var/log/apache/ Sample outputs: building file list ... done ./ cricketnow.in/ cyberciti.biz/ hexindia.net/ io9.in/ nixcraft.com/ theos.in/ sent 388 bytes received 98 bytes 972.00 bytes/sec total size is 0 speedup is 0.00 You can also make local copies as follows: # cd /var/log/apache/ # rsync -av -f"+ */" -f"- *" . /jailfs/apache/httpd_root/var/log/apache/
相关推荐
  xiaoemo0    2020-06-17  
   awoyaoc    2020-06-12  
   wiseMale    2020-05-31  
   会哭的雨    2020-05-30  
   ITlover00    2020-05-26  
   plusz    2020-05-09  
   深井兮兮    2020-05-01  
   jiangtie    2020-04-30  
   净无邪    2020-04-26  
   Wytheme    2020-02-16  
   secondid    2020-02-03  
   秋风瑟瑟    2020-01-06  
   会哭的雨    2019-12-12  
   insularisland    2019-12-06  
   leodengzx    2019-12-03  
   博小瑾    2014-03-18  
   ourtimes    2015-05-02  
   云计算和大数据    2019-11-12  
 