Skip to content

Commit e1f9069

Browse files
authored
ln, curl: update Chinese translations (#23711)
1 parent a4ee2d1 commit e1f9069

2 files changed

Lines changed: 25 additions & 21 deletions

File tree

pages.zh/common/curl.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
# curl
22

3-
> 向 / 从一个服务器传输数据
4-
> 支持大多数协议,包括 HTTP, FTP,POP3
3+
> 从服务器接收数据或者向服务器发送数据
4+
> 支持包括 HTTP、HTTPS、FTP 和 SCP 在内的大多数协议
55
> 另请参阅:`wcurl`, `wget`
66
> 更多信息:<https://curl.se/docs/manpage.html>
77
8-
- 将指定 URL 的内容下载到文件
8+
- 发起 HTTP GET 请求,将响应内容输出到 `stdout`
99

10-
`curl {{http://example.com}} {{[-o|--output]}} {{文件名}}`
10+
`curl {{https://example.com}}`
1111

12-
- 将文件从 URL 保存到由 URL 指示的文件名中
12+
- 发起 HTTP GET 请求,自动跟随所有 `3xx` 重定向,将响应头和内容输出到 `stdout`
1313

14-
`curl {{[-O|--remote-name]}} {{http://example.com/filename}}`
14+
`curl {{[-L|--location]}} {{[-D|--dump-header]}} - {{https://example.com}}`
1515

16-
- 下载文件,跟随 重定向,并且自动 续传(恢复)前序文件传输
16+
- 按照 URL 指定的文件名保存下载内容
1717

18-
`curl {{[-f|--fail]}} {{[-O|--remote-name]}} {{[-L|--location]}} {{[-C|--continue-at]}} - {{http://example.com/filename}}`
18+
`curl {{[-O|--remote-name]}} {{https://example.com/filename.zip}}`
1919

20-
- 发送表单编码数据`application/x-www-form-urlencoded` POST 请求):
20+
- 以表单编码格式发送数据`application/x-www-form-urlencoded` 类型的 POST 请求)。如需从 `stdin` 读取数据,可使用 `--data @file_name``--data @'-'`
2121

22-
`curl {{[-d|--data]}} {{'name=bob'}} {{http://example.com/form}}`
22+
`curl {{[-X|--request]}} POST {{[-d|--data]}} '{{name=bob}}' {{http://example.com/form}}`
2323

24-
- 发送带有额外请求头,使用自定义请求方法的请求
24+
- 通过代理(如 BurpSuite)使用自定义 HTTP 方法发送带有额外请求头的请求,同时忽略不安全的自签名证书
2525

26-
`curl {{[-H|--header]}} {{'X-My-Header: 123'}} {{[-X|--request]}} {{PUT}} {{http://example.com}}`
26+
`curl {{[-k|--insecure]}} {{[-x|--proxy]}} {{http://127.0.0.1:8080}} {{[-H|--header]}} '{{Authorization: Bearer token}}' {{[-X|--request]}} {{GET|PUT|POST|DELETE|PATCH|...}} {{https://example.com}}`
2727

28-
- 发送 JSON 格式的数据,并附加正确的 `Content-Type` 请求头:
28+
- 设置正确的 `Content-Type` 请求头,以 JSON 格式发送数据
2929

30-
`curl {{[-d|--data]}} {{'{"name":"bob"}'}} {{[-H|--header]}} {{'Content-Type: application/json'}} {{http://example.com/users/1234}}`
30+
`curl {{[-d|--data]}} '{{{"name":"bob"}}}' {{[-H|--header]}} '{{Content-Type: application/json}}' {{http://example.com/users/1234}}`
3131

32-
- 使用用户名和密码,授权访问服务器
32+
- 跳过证书验证,使用客户端证书和私钥发起请求
3333

34-
`curl {{[-u|--user]}} {{用户名}} {{http://example.com}}`
34+
`curl {{[-E|--cert]}} {{client.pem}} --key {{key.pem}} {{[-k|--insecure]}} {{https://example.com}}`
3535

36-
- 为指定资源使用客户端证书和密钥,并且跳过证书验证
36+
- 将主机名解析为自定义 IP 地址,以详细模式输出结果(类似于通过编辑 `/etc/hosts` 文件自定义 DNS 解析)
3737

38-
`curl {{[-E|--cert]}} {{client.pem}} --key {{key.pem}} {{[-k|--insecure]}} {{https://example.com}}`
38+
`curl {{[-v|--verbose]}} --resolve {{example.com}}:{{80}}:{{127.0.0.1}} {{http://example.com}}`

pages.zh/common/ln.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
66
- 创建指向文件或目录的符号链接:
77

8-
`ln {{[-s|--symbolic]}} {{/路径/到/文件或目录}} {{路径/到/符号链接}}`
8+
`ln {{[-s|--symbolic]}} /{{路径/到/文件或目录}} {{路径/到/符号链接}}`
9+
10+
- 创建相对于链接所在位置的符号链接:
11+
12+
`ln {{[-s|--symbolic]}} {{路径/到/文件或目录}} {{路径/到/符号链接}}`
913

1014
- 覆盖现有的符号链接以指向其他文件:
1115

12-
`ln {{[-sf|--symbolic --force]}} {{/路径/到/新文件}} {{路径/到/符号链接}}`
16+
`ln {{[-sf|--symbolic --force]}} /{{路径/到/新文件}} {{路径/到/符号链接}}`
1317

1418
- 创建文件的硬链接:
1519

16-
`ln {{/路径/到/文件}} {{路径/到/硬链接}}`
20+
`ln /{{路径/到/文件}} {{路径/到/硬链接}}`

0 commit comments

Comments
 (0)