使用Rsync同步的时候往往会要求对某个文件夹或者文件进行忽略,客户端可以使用--exclude参数来实现对,目录或者文件的忽略

rsync -rltvz --port=873 --exclude ".svn" --exclude "Log" --progress --delete web@192.168.1.1::web /cygdrive/D/web/

 

 

另外排除的文件及目录较多的情况还可以写到一个文件里:

rsync -rltvz --port=873 --exclude-from=exclude.txt --progress --delete web@192.168.1.1::web /cygdrive/D/web/

 

exclude.txt 文件格式如下:

.svn

Log

abc.txt



转载于:https://blog.51cto.com/13505030/2047570

相关文章:

  • 2021-10-23
  • 2021-08-04
猜你喜欢
  • 2021-12-06
  • 2021-06-27
  • 2021-11-19
  • 2022-12-23
  • 2021-11-19
  • 2021-11-29
相关资源
相似解决方案