Rsync无法识别区域设置

时间:2017-07-20 18:55:22

标签: rsync

我尝试将两台Ububntu机器同步到Rsync。当我执行:

rsync -rv -p 2222 --progress --delete-before --ignore-existing andrew@192.168.0.101:/media/Maindata/Книги/ /media/Maindata/Книги

我得到了:

Unexpected remote arg: andrew@192.168.0.101:/media/Maindata/\#320\#232\#320\#275\#320\#270\#320\#263\#320\#270/
rsync error: syntax or usage error (code 1) at main.c(1348) [sender=3.1.1]

在我的andrew@192.168.0.101处执行区域设置后,机器输出是这样的:

LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="ru_UA.UTF-8"
LC_NUMERIC="ru_UA.UTF-8"
LC_TIME="ru_UA.UTF-8"
LC_COLLATE="ru_UA.UTF-8"
LC_MONETARY="ru_UA.UTF-8"
LC_MESSAGES="ru_UA.UTF-8"
LC_PAPER="ru_UA.UTF-8"
LC_NAME="ru_UA.UTF-8"
LC_ADDRESS="ru_UA.UTF-8"
LC_TELEPHONE="ru_UA.UTF-8"
LC_MEASUREMENT="ru_UA.UTF-8"
LC_IDENTIFICATION="ru_UA.UTF-8"
LC_ALL=ru_UA.UTF-8

但是,当我从客户那里做到这一点时:

    ssh -p 2222 andrew@192.168.0.101 locale

LANGUAGE env var已经消失:

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="ru_UA.UTF-8"
LC_NUMERIC="ru_UA.UTF-8"
LC_TIME="ru_UA.UTF-8"
LC_COLLATE="ru_UA.UTF-8"
LC_MONETARY="ru_UA.UTF-8"
LC_MESSAGES="ru_UA.UTF-8"
LC_PAPER="ru_UA.UTF-8"
LC_NAME="ru_UA.UTF-8"
LC_ADDRESS="ru_UA.UTF-8"
LC_TELEPHONE="ru_UA.UTF-8"
LC_MEASUREMENT="ru_UA.UTF-8"
LC_IDENTIFICATION="ru_UA.UTF-8"
LC_ALL=ru_UA.UTF-8

这可能是我的语言环境问题吗?或者别的什么。

1 个答案:

答案 0 :(得分:1)

试试这个:

rsync -rv -p 2222 --progress --delete-before --ignore-existing - iconv = iso639-2,iso8859-1 andrew@192.168.0.101:/ media / Maindata /Книги/ / media / Maindata /Книги

rsync -rv -p 2222 --progress --delete-before --ignore-existing - iconv = iso8859-1,iso639-2 andrew@192.168.0.101:/ media / Maindata /Книги/ / media / Maindata /Книги