rsync -avm --include=".gitignore" --include='*/' --exclude='*' /source/ /target/
Example for all rar files
lake@M5273296:/mnt/c/work/temp$ rsync -avm --include="*.rar" --include='*/' --exclude='*' "source/" /mnt/d/
本文介绍如何利用rsync命令进行精确的数据同步,通过包含和排除特定文件类型的策略,实现高效、精确的文件同步过程。示例展示了如何仅同步.gitignore文件及所有RAR压缩文件。
rsync -avm --include=".gitignore" --include='*/' --exclude='*' /source/ /target/
Example for all rar files
lake@M5273296:/mnt/c/work/temp$ rsync -avm --include="*.rar" --include='*/' --exclude='*' "source/" /mnt/d/

被折叠的 条评论
为什么被折叠?