Skip to content

Commit d698531

Browse files
authored
rsync: add Chinese translation (#5200)
1 parent dc12980 commit d698531

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

pages.zh/common/rsync.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# rsync
2+
3+
> 一种快速,通用,远程(和本地)文件复制工具。
4+
> 更多信息:<https://man7.org/linux/man-pages/man1/rsync.1.html>
5+
6+
- 从本地传输文件到远程主机:
7+
8+
`rsync {{path/to/local_file}} {{remote_host}}:{{path/to/remote_directory}}`
9+
10+
- 从远程主机传输文件到本地:
11+
12+
`rsync {{remote_host}}:{{path/to/remote_file}} {{path/to/local_directory}}`
13+
14+
- 将本地文件以归档模式并保留几乎所有属性,同时使用压缩功能传输到远程主机,并以人类可读方式输出详细信息和进度条:
15+
16+
`rsync --archive --compress --verbose --human-readable --progress {{path/to/local_file}} {{remote_host}}:{{path/to/remote_directory}}`
17+
18+
- 将远程主机目录上的所有文件,以递归模式传输到本地:
19+
20+
`rsync --recursive {{remote_host}}:{{path/to/remote_directory}} {{path/to/local_directory}}`
21+
22+
- 将远程主机该目录下的所有内容(不包含该目录),以递归方式传输到本地:
23+
24+
`rsync --recursive {{remote_host}}:{{path/to/remote_directory}}/ {{path/to/local_directory}}`
25+
26+
- 递归方式传输目录,保留几乎所有属性,解析软连接,并忽略已传输的文件:
27+
28+
`rsync --recursive --archive --update --copy-links {{remote_host}}:{{path/to/remote_file}} {{path/to/local_directory}}`
29+
30+
- 指定本地和远程之间通信方式:
31+
32+
`rsync --rsh ssh {{remote_host}}:{{path/to/remote_file}} {{path/to/local_file}}`
33+
34+
- 指定本地和远程之间通信方式,使用指定端口,并显示进度条:
35+
36+
`rsync --rsh 'ssh -p {{port}}' --progress {{remote_host}}:{{path/to/remote_file}} {{path/to/local_file}}`

0 commit comments

Comments
 (0)