Windows和Linux端rsync推拉同步时中文乱码解决方法

简介:

主要原因是因为Windows和Linux端文件名编码不同导致的!

rsync在3.0版本之后,提供了一个选项,可以进行文件编码的转换,格式如下:
--iconv=<local>,<remote>
local指本地编码,remote指远程机器编码,参考示例如下:

从Linux sersync推到Windows时:
Linux端sersync confxml.xml配置<commonParams params="-avzP --iconv=GBK,UTF-8"/>
Windows端rsyncd.conf配置文件中添加charset = UTF-8

Windows端从Linux端拉过来时:
Windows端cwRsync要有--iconv=UTF-8,GBK选项
Linux端rsyncd.conf要添加charset = GBK

遇到问题:从Linux推到Windows端时,中英文的文件都正常,但是如果在Linux端删掉文件,Windows端的中文文件不会被删除!

目录
相关文章
|
29天前
|
Windows
Windows批处理(BAT)文件执行时“一闪而过或闪退”问题及解决方法
Windows批处理(BAT)文件执行时“一闪而过或闪退”问题及解决方法
37 1
|
1月前
|
Ubuntu Unix Linux
Linux 用户使用sudo时 显示xxx is not in the sudoers file.This incident will be reported.的解决方法
Linux 用户使用sudo时 显示xxx is not in the sudoers file.This incident will be reported.的解决方法
27 1
|
15天前
|
安全 算法 Linux
【Linux】线程安全——补充|互斥、锁|同步、条件变量(下)
【Linux】线程安全——补充|互斥、锁|同步、条件变量(下)
22 0
|
15天前
|
存储 安全 Linux
【Linux】线程安全——补充|互斥、锁|同步、条件变量(上)
【Linux】线程安全——补充|互斥、锁|同步、条件变量(上)
22 0
|
19天前
|
安全 网络协议 Linux
【Windows】已解决:修改本地host文件异常的正确解决方法
【Windows】已解决:修改本地host文件异常的正确解决方法
38 0
|
22天前
|
NoSQL Redis Windows
redis双击闪退解决方法,windows版的redis资源,redis安装,win资源可下
redis双击闪退解决方法,windows版的redis资源,redis安装,win资源可下
|
1月前
|
Ubuntu Linux 应用服务中间件
MAC在Linux上上传本地文件压缩包(tomcat)解决方法(炒鸡详细)
MAC在Linux上上传本地文件压缩包(tomcat)解决方法(炒鸡详细)
|
1月前
|
监控 Linux
Linux修改fs.inotify.max_user_watches(“外部文件更改同步可能很慢”和“当前的 inotify(7) 监视限制太低”)
Linux修改fs.inotify.max_user_watches(“外部文件更改同步可能很慢”和“当前的 inotify(7) 监视限制太低”)
18 0
|
1月前
|
Ubuntu Unix Linux
Linux 用户使用sudo时 显示xxx is not in the sudoers file.This incident will be reported.的解决方法
Linux 用户使用sudo时 显示xxx is not in the sudoers file.This incident will be reported.的解决方法
24 0
|
1月前
|
网络协议 Linux Shell
【权限提升】Linux系统&Docker挂载&Rsync未授权&Sudo-CVE&Polkit-CVE
【权限提升】Linux系统&Docker挂载&Rsync未授权&Sudo-CVE&Polkit-CVE