本站文章总数为:165
Search Posts

rsync同步排除子文件夹子文件的问题处理

内容纲要

想排除同步目录config/log4j2.xml
原始命令

exclude_list="--exclude=*.svn   --exclude=game_server.conf --exclude=game_server --exclude=log4j2 --exclude=.rsync.pass"
rsync -az  --password-file=${pass_file} --delete  ${rsync_host}   ${exclude_list} --port=${rsync_port} ${GameDir}

加在上方列表无效

无论我填写
--exclude='*log4j2.xml*' --exclude='config/log4j2.xml' --exclude='/config/log4j2.xml' --exclude='./config/log4j2.xml' --exclude='*config/log4j2.xml'

exclude_list="--exclude=*.svn --exclude='*log4j2.xml*'  --exclude=game_server.conf --exclude=game_server --exclude=log4j2 --exclude=.rsync.pass"
rsync -az  --password-file=${pass_file} --delete  ${rsync_host}   ${exclude_list} --port=${rsync_port} ${GameDir}

最后加到下面

exclude_list="--exclude=*.svn   --exclude=game_server.conf --exclude=game_server --exclude=log4j2 --exclude=.rsync.pass"
rsync -az  --password-file=${pass_file} --delete  ${rsync_host} --exclude='*log4j2.xml*'  ${exclude_list} --port=${rsync_port} ${GameDir}

麻中麻,不清楚原理 先记录,后面知道了补上

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注