Skip to content

Commit c84d163

Browse files
authored
Update curl.md
1 parent 1425249 commit c84d163

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

command/curl.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ curl(选项)(参数)
121121

122122
### 实例
123123

124-
**文件下载**
124+
**文件下载**
125125

126126
curl命令可以用来执行下载、发送各种HTTP请求,指定HTTP头部等操作。如果系统没有curl可以使用`yum install curl`安装,也可以下载安装。curl是将下载文件输出到stdout,将进度信息输出到stderr,不显示进度信息使用`--silent`选项。
127127

@@ -144,7 +144,7 @@ curl http://man.linuxde.net/test.iso -o filename.iso --progress
144144
######################################### 100.0%
145145
```
146146

147-
**断点续传**
147+
**断点续传**
148148

149149
curl能够从特定的文件偏移处继续下载,它可以通过指定一个便宜量来下载部分文件:
150150

@@ -155,7 +155,7 @@ curl URL/File -C 偏移量
155155
curl -C -URL
156156
```
157157

158-
**使用curl设置参照页字符串**
158+
**使用curl设置参照页字符串**
159159

160160
参照页是位于HTTP头部中的一个字符串,用来表示用户是从哪个页面到达当前页面的,如果用户点击网页A中的某个连接,那么用户就会跳转到B网页,网页B头部的参照页字符串就包含网页A的URL。
161161

@@ -165,7 +165,7 @@ curl -C -URL
165165
curl --referer http://www.google.com http://man.linuxde.net
166166
```
167167

168-
**用curl设置cookies**
168+
**用curl设置cookies**
169169

170170
使用`--cookie "COKKIES"`选项来指定cookie,多个cookie使用分号分隔:
171171

@@ -179,7 +179,7 @@ curl http://man.linuxde.net --cookie "user=root;pass=123456"
179179
curl URL --cookie-jar cookie_file
180180
```
181181

182-
**用curl设置用户代理字符串**
182+
**用curl设置用户代理字符串**
183183

184184
有些网站访问会提示只能使用IE浏览器来访问,这是因为这些网站设置了检查用户代理,可以使用curl把用户代理设置为IE,这样就可以访问了。使用`--user-agent`或者`-A`选项:
185185

@@ -194,7 +194,7 @@ curl URL -A "Mozilla/5.0"
194194
curl -H "Host:man.linuxde.net" -H "accept-language:zh-cn" URL
195195
```
196196

197-
**curl的带宽控制和下载配额**
197+
**curl的带宽控制和下载配额**
198198

199199
使用`--limit-rate`限制curl的下载速度:
200200

@@ -212,7 +212,7 @@ curl URL --max-filesize bytes
212212

213213
如果文件大小超出限制,命令则返回一个非0退出码,如果命令正常则返回0。
214214

215-
**用curl进行认证**
215+
**用curl进行认证**
216216

217217
使用curl选项 -u 可以完成HTTP或者FTP的认证,可以指定密码,也可以不指定密码在后续操作中输入密码:
218218

@@ -221,7 +221,7 @@ curl -u user:pwd http://man.linuxde.net
221221
curl -u user http://man.linuxde.net
222222
```
223223

224-
**只打印响应头部信息**
224+
**只打印响应头部信息**
225225

226226
通过`-I`或者`-head`可以只打印出HTTP头部信息:
227227

@@ -236,7 +236,7 @@ Vary: Accept-Encoding
236236
X-Pingback: http://man.linuxde.net/xmlrpc.php
237237
```
238238

239-
**get请求 **
239+
**get请求**
240240

241241
```bash
242242
curl "http://www.baidu.com" # 如果这里的URL指向的是一个文件或者一幅图都可以直接下载到本地

0 commit comments

Comments
 (0)