Skip to content

Commit 7f69a6b

Browse files
committed
Update curl,date,declare
1 parent 0df3c23 commit 7f69a6b

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

command/curl.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ curl URL --silent
134134
使用选项`-O`将下载的数据写入到文件,必须使用文件的绝对地址:
135135

136136
```
137-
curl http://man.linuxde.net/text.iso --silent -O
137+
curl http://wangchujiang.com/text.iso --silent -O
138138
```
139139

140140
选项`-o`将下载数据写入到指定名称的文件中,并使用`--progress`显示进度条:
141141

142142
```
143-
curl http://man.linuxde.net/test.iso -o filename.iso --progress
143+
curl http://wangchujiang.com/test.iso -o filename.iso --progress
144144
######################################### 100.0%
145145
```
146146

@@ -162,15 +162,15 @@ curl -C -URL
162162
使用`--referer`选项指定参照页字符串:
163163

164164
```
165-
curl --referer http://www.google.com http://man.linuxde.net
165+
curl --referer http://www.google.com http://wangchujiang.com
166166
```
167167

168168
**用curl设置cookies**
169169

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

172172
```
173-
curl http://man.linuxde.net --cookie "user=root;pass=123456"
173+
curl http://wangchujiang.com --cookie "user=root;pass=123456"
174174
```
175175

176176
将cookie另存为一个文件,使用`--cookie-jar`选项:
@@ -191,7 +191,7 @@ curl URL -A "Mozilla/5.0"
191191
其他HTTP头部信息也可以使用curl来发送,使用`-H`"头部信息" 传递多个头部信息,例如:
192192

193193
```
194-
curl -H "Host:man.linuxde.net" -H "accept-language:zh-cn" URL
194+
curl -H "Host:wangchujiang.com" -H "accept-language:zh-cn" URL
195195
```
196196

197197
**curl的带宽控制和下载配额**
@@ -217,23 +217,23 @@ curl URL --max-filesize bytes
217217
使用curl选项 -u 可以完成HTTP或者FTP的认证,可以指定密码,也可以不指定密码在后续操作中输入密码:
218218

219219
```
220-
curl -u user:pwd http://man.linuxde.net
221-
curl -u user http://man.linuxde.net
220+
curl -u user:pwd http://wangchujiang.com
221+
curl -u user http://wangchujiang.com
222222
```
223223

224224
**只打印响应头部信息**
225225

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

228228
```
229-
[root@localhost text]# curl -I http://man.linuxde.net
229+
[root@localhost text]# curl -I http://wangchujiang.com
230230
HTTP/1.1 200 OK
231231
Server: nginx/1.2.5
232232
date: Mon, 10 Dec 2012 09:24:34 GMT
233233
Content-Type: text/html; charset=UTF-8
234234
Connection: keep-alive
235235
Vary: Accept-Encoding
236-
X-Pingback: http://man.linuxde.net/xmlrpc.php
236+
X-Pingback: http://wangchujiang.com/xmlrpc.php
237237
```
238238

239239
**get请求**

command/date.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ date -s "20120523 01:01:01" //这样可以设置全部时间
145145
#!/bin/bash
146146
147147
start=$(date +%s)
148-
nmap man.linuxde.net &> /dev/null
148+
nmap wangchujiang.com &> /dev/null
149149
150150
end=$(date +%s)
151151
difference=$(( end - start ))

command/declare.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
declare
22
===
3-
3+
44
声明或显示shell变量
55

66
## 补充说明
@@ -29,10 +29,10 @@ shell变量:声明shell变量,格式为“变量名=值”。
2929

3030
### 实例
3131

32-
首先使用declare命令定义shell变量"test",并且将其值设置为"man.linuxde.net",输入如下命令:
32+
首先使用declare命令定义shell变量"test",并且将其值设置为"wangchujiang.com",输入如下命令:
3333

3434
```
35-
declare test='man.linuxde.net' #定义并初始化shell变量
35+
declare test='wangchujiang.com' #定义并初始化shell变量
3636
```
3737

3838
上面的命令执行后,再使用echo命令将该shell变量值输出,输入如下命令:
@@ -44,7 +44,7 @@ echo $test #输出shell变量的值
4444
上面的指令执行后,其输出的结果如下:
4545

4646
```
47-
man.linuxde.net
47+
wangchujiang.com
4848
```
4949

5050

0 commit comments

Comments
 (0)