rsync 只同步目錄結(jié)構(gòu)不同步文件的方法
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/ root@www433.nixcraft.net.in:/path/to/apache/logs/
# cd /var/log/apache/
# rsync -av -f"+ */" -f"- *" . root@server2.nixcraft.com:/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/
相關(guān)文章
git安裝步驟_動力節(jié)點Java學(xué)院整理
這篇文章主要為大家詳細介紹了git安裝步驟的相關(guān)教程,Linux上安裝Git、Mac OS X上安裝Git,以及Windows上安裝Git,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-08-08一文概括6種負載均衡技術(shù)的實現(xiàn)方式(小結(jié))
這篇文章主要介紹了一文概括6種負載均衡技術(shù)的實現(xiàn)方式(小結(jié)),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2019-05-05win10同網(wǎng)段/跨網(wǎng)段訪問虛擬機samba服務(wù)器的過程記錄
這篇文章主要介紹了win10同網(wǎng)段/跨網(wǎng)段訪問虛擬機samba服務(wù)器,主要包括環(huán)境搭建和ubuntu端的安裝配置過程,本文給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2022-06-06使用idea搭建springboot initializer服務(wù)器的問題分析
這篇文章主要介紹了使用idea搭建springboot initializer服務(wù)器的問題分析,本文給大家分享大家過程通過示例代碼給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-10-10