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/ 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/
相關文章
win10同網(wǎng)段/跨網(wǎng)段訪問虛擬機samba服務器的過程記錄
這篇文章主要介紹了win10同網(wǎng)段/跨網(wǎng)段訪問虛擬機samba服務器,主要包括環(huán)境搭建和ubuntu端的安裝配置過程,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2022-06-06使用idea搭建springboot initializer服務器的問題分析
這篇文章主要介紹了使用idea搭建springboot initializer服務器的問題分析,本文給大家分享大家過程通過示例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-10-10