Linux curl命令 博客分类: Linux CentOSlinux
程序员文章站
2024-03-18 15:25:04
...
参考:http://www.linuxdiyf.com/linux/2800.html
http://dbajun.iteye.com/blog/1813801
测试访问网页:
[zabbix@zabbix server]$ curl www.baidu.com
<!DOCTYPE html><!--STATUS OK--><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><meta content="always" name="referrer">
...
...
'result_form':"#form",'result_kw':"#kw"});</script><script>if(navigator.cookieEnabled){document.cookie="NOJS=;expires=Sat, 01 Jan 2000 00:00:00 GMT";}</script></body></html>
[zabbix@zabbix server]$
路径访问:
[zabbix@zabbix server]$ curl http://donald-draper.iteye.com/admin/blogs/2316699
<html><body>You are being <a href="http://www.iteye.com/login">redirected</a>.</body></html>[zabbix@zabbix server]$
带参数:
[zabbix@zabbix server]$ curl http://192.168.126.128/zabbix/dashboard.php?sid=9422e571896006a3
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>zabbixServer: Dashboard</title>
<meta name="Author" content="Zabbix SIA" />
<meta charset="utf-8" />
<meta name="msapplication-config" content="none"/>
<link rel="shortcut icon" href="images/general/zabbix.ico" />
....
.....
hat_lastiss":{"frequency":60,"url":'?output=html',"counter":0,"darken":0,"params":{"favobj":'hat',"favref":'hat_lastiss',"favaction":'refresh'}},"hat_webovr":{"frequency":60,"url":'?output=html',"counter":0,"darken":0,"params":{"favobj":'hat',"favref":'hat_webovr',"favaction":'refresh'}},"hat_hoststat":{"frequency":60,"url":'?output=html',"counter":0,"darken":0,"params":{"favobj":'hat',"favref":'hat_hoststat',"favaction":'refresh'}}});
jqBlink.blink();
cookie.init();
chkbxRange.init();
});
// ]]></script></body>
</html>
[zabbix@zabbix server]$
测试保存网页命令
[zabbix@zabbix server]$ curl -o baidu.html www.baidu.com
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 99583 0 99583 0 0 31378 0 --:--:-- 0:00:03 --:--:-- 31374
[zabbix@zabbix server]$ ls -al
total 2092
-rw-rw-r-- 1 zabbix zabbix 99583 Aug 10 17:33 baidu.html
http://dbajun.iteye.com/blog/1813801
测试访问网页:
[zabbix@zabbix server]$ curl www.baidu.com
<!DOCTYPE html><!--STATUS OK--><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><meta content="always" name="referrer">
...
...
'result_form':"#form",'result_kw':"#kw"});</script><script>if(navigator.cookieEnabled){document.cookie="NOJS=;expires=Sat, 01 Jan 2000 00:00:00 GMT";}</script></body></html>
[zabbix@zabbix server]$
路径访问:
[zabbix@zabbix server]$ curl http://donald-draper.iteye.com/admin/blogs/2316699
<html><body>You are being <a href="http://www.iteye.com/login">redirected</a>.</body></html>[zabbix@zabbix server]$
带参数:
[zabbix@zabbix server]$ curl http://192.168.126.128/zabbix/dashboard.php?sid=9422e571896006a3
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>zabbixServer: Dashboard</title>
<meta name="Author" content="Zabbix SIA" />
<meta charset="utf-8" />
<meta name="msapplication-config" content="none"/>
<link rel="shortcut icon" href="images/general/zabbix.ico" />
....
.....
hat_lastiss":{"frequency":60,"url":'?output=html',"counter":0,"darken":0,"params":{"favobj":'hat',"favref":'hat_lastiss',"favaction":'refresh'}},"hat_webovr":{"frequency":60,"url":'?output=html',"counter":0,"darken":0,"params":{"favobj":'hat',"favref":'hat_webovr',"favaction":'refresh'}},"hat_hoststat":{"frequency":60,"url":'?output=html',"counter":0,"darken":0,"params":{"favobj":'hat',"favref":'hat_hoststat',"favaction":'refresh'}}});
jqBlink.blink();
cookie.init();
chkbxRange.init();
});
// ]]></script></body>
</html>
[zabbix@zabbix server]$
测试保存网页命令
[zabbix@zabbix server]$ curl -o baidu.html www.baidu.com
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 99583 0 99583 0 0 31378 0 --:--:-- 0:00:03 --:--:-- 31374
[zabbix@zabbix server]$ ls -al
total 2092
-rw-rw-r-- 1 zabbix zabbix 99583 Aug 10 17:33 baidu.html
上一篇: c++结合EasyX实现射击小游戏之美
下一篇: 盘点程序员新年要做的10个决定
推荐阅读
-
lamp的搭建 博客分类: linux apache mysql
-
centos 添加sudo权限 博客分类: Linux centos
-
光盘yum源搭建 博客分类: Linux yum源光盘
-
【转】Linux Cpu查询 博客分类: Linux/Win Linuxcputop
-
linux防火墙iptables配置简要 博客分类: Linux linux防火墙iptables配置
-
linux安装redis主备安装配置 博客分类: redis linuxredis主从配置
-
Linux命令的点点滴滴 博客分类: Linux Linux脚本命令
-
Unix Linux Find 命令 博客分类: Unix/Linux UnixLinuxFind命令find . -type f -name data.txt
-
shell 之hello world 博客分类: Linux linux shellhelloworld
-
Linux curl命令 博客分类: Linux CentOSlinux