curl命令用法

CURL
Curl 的一些用法详解,Commad Line URL vi

curl 是一种命令行工具,作用是发出网络请求,然后得到和提取数据,显示在“标准输出”(stdout)上面,他支持多种协议。

一、查看网页源代码

直接在curl命令后加上网址,可以看到网页源码。

$ curl www.sina.com

  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  <html><head>
  <title>301 Moved Permanently</title>
  </head><body>
  <h1>Moved Permanently</h1>
  <p>The document has moved <a href="http://www.sina.com.cn/">here</a>.</p>
  </body></html>

猜你喜欢

转载自blog.csdn.net/AlbenXie/article/details/87865151
今日推荐