From 14ea45723ba1c4e806e0b06e3e6a56520353bfba Mon Sep 17 00:00:00 2001 From: Ein Verne Date: Tue, 6 Feb 2024 23:51:49 +0900 Subject: [PATCH] rsync: update Chinese translation (#12193) --- pages.zh/common/rsync.md | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/pages.zh/common/rsync.md b/pages.zh/common/rsync.md index 03cfef972..57cdc31c0 100644 --- a/pages.zh/common/rsync.md +++ b/pages.zh/common/rsync.md @@ -1,36 +1,37 @@ # rsync -> 一种快速,通用,远程(和本地)文件复制工具。 +> 一种快速,通用,远程(和本地)文件复制工具,默认使用 SSH。 +> 如果要指定远程路径,请使用 `user@host:path/to/file_or_directory`. > 更多信息:. -- 从本地传输文件到远程主机: +- 复制文件: -`rsync {{path/to/local_file}} {{remote_host}}:{{path/to/remote_directory}}` +`rsync {{路径/到/来源}} {{路径/到/目标}}` -- 从远程主机传输文件到本地: +- 使用归档模式递归拷贝文件,并保留所有属性,不解析软链接: -`rsync {{remote_host}}:{{path/to/remote_file}} {{path/to/local_directory}}` +`rsync --archive {{路径/到/来源}} {{路径/到/目标}}` -- 将本地文件以归档模式并保留几乎所有属性,同时使用压缩功能传输到远程主机,并以人类可读方式输出详细信息和进度条: +- 将文件以归档模式并保留几乎所有属性进行传输,并以人类可读方式输出详细信息和进度条,中断时保留部分信息: -`rsync --archive --compress --verbose --human-readable --progress {{path/to/local_file}} {{remote_host}}:{{path/to/remote_directory}}` +`rsync --compress --verbose --human-readable --partial --progress {{路径/到/来源}} {{路径/到/目标}}` -- 将远程主机目录上的所有文件,以递归模式传输到本地: +- 以递归模式传输文件: -`rsync --recursive {{remote_host}}:{{path/to/remote_directory}} {{path/to/local_directory}}` +`rsync --recursive {{路径/到/来源}} {{路径/到/目标}}` -- 将远程主机该目录下的所有内容(不包含该目录),以递归方式传输到本地: +- 将目录下的所有内容(不包含该目录),以递归方式传输: -`rsync --recursive {{remote_host}}:{{path/to/remote_directory}}/ {{path/to/local_directory}}` +`rsync --recursive {{路径/到/来源}}/ {{路径/到/目标}}` -- 递归方式传输目录,保留几乎所有属性,解析软连接,并忽略已传输的文件: +- 归档方式传输目录,保留几乎所有属性,解析软连接,并忽略已传输的文件: -`rsync --recursive --archive --update --copy-links {{remote_host}}:{{path/to/remote_file}} {{path/to/local_directory}}` +`rsync --archive --update --copy-links {{路径/到/来源}} {{路径/到/目标}}` -- 指定本地和远程之间通信方式: +- 传输目录到运行 `rsyncd` 的远端,并删除目标目录中源目录中不存在的文件: -`rsync --rsh ssh {{remote_host}}:{{path/to/remote_file}} {{path/to/local_file}}` +`rsync --recursive --delete rsync://{{host}}:{{路径/到/来源}} {{路径/到/目标}}` - 指定本地和远程之间通信方式,使用指定端口,并显示进度条: -`rsync --rsh 'ssh -p {{port}}' --progress {{remote_host}}:{{path/to/remote_file}} {{path/to/local_file}}` +`rsync --rsh 'ssh -p {{端口}}' --info=progress2 {{host}}:{{路径/到/来源}} {{路径/到/目标}}`