Ubuntu 16.04 及衍生版安装 cURL 7.49.0
cURL 7.49.0最近发布,cURL是利用URL语法在命令行方式下工作的开源文件传输工具。支持DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP。
cURL支持SSL证书,HTTP POST,HTTP PUT,FTP上传,基于HTTP的形式上传,代理,cookies,用户+密码验证(基本,摘要,NTLM,协商,Kerberos…),文件传输简历,代理隧道和总线负载。
cURL 7.49.0 更新日志
变化:
- schannel: Add ALPN support
- SSH: support CURLINFO_FILETIME
- SSH: new CURLOPT_QUOTE command “statvfs”
- wolfssl: Add ALPN support
- http2: added –http2-prior-knowledge
- http2: added CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
- libcurl: added CURLOPT_CONNECT_TO
- curl: added –connect-to
- libcurl: added CURLOPT_TCP_FASTOPEN
- curl: added –tcp-fastopen
- curl: remove support for –ftpport, -http-request and –socks
Bug修复:
- CVE-2016-3739: TLS certificate check bypass with mbedTLS/PolarSSL
- checksrc.bat: Updated the help to be consistent with generate.bat
- checksrc.bat: Added support for scanning the tests and examples
- openssl: fix ERR_remove_thread_state() for boringssl/libressl
- openssl: boringssl provides the same numbering as openssl
- multi: fix “Operation timed out after” timer
- url: don’t use bad offset in tld_check_name to show error
- sshserver.pl: use quotes for given options
- Makefile.am: skip the scripts dir
- curl: warn for –capath use if not supported by libcurl
- http2: fix connection reuse
- GSS: make Curl_gss_log_error more verbose
- build-wolfssl: Allow a broader range of ciphers (Visual Studio)
- wolfssl: Use ECC supported curves extension
- openssl: Fix compilation warnings
- 还有
16.04 及衍生版安装 cURL 7.49.0
wget https://curl.haxx.se/download/curl-7.49.0.tar.gz(见下图)
tar -xvf curl-7.49.0.tar.gz(见上图)
cd curl-7.49.0/./configure(见下图)
make(见下图)
sudo make install(见下图)
curl(文件传输工具)常用参数如下:
-c,–cookie-jar:将cookie写入到文件
-b,–cookie:从文件中读取cookie
-C,–continue-at:断点续传
-d,–data:http post方式传送数据
-D,–dump-header:把header信息写入到文件
-F,–from:模拟http表达提交数据
-s,–slient:减少输出信息
-o,–output:将信息输出到文件
-O,–remote-name:按照服务器上的文件名,存在本地
–l,–head:仅返回头部信息
-u,–user[user:pass]:设置http认证用户和密码
-T,–upload-file:上传文件
-e,–referer:指定引用地址
-x,–proxy:指定代理服务器地址和端口
-w,–write-out:输出指定格式内容
–retry:重试次数
–connect-timeout:指定尝试连接的最大时间/s
使用示例:
例1:抓取页面到指定文件,如果有乱码可以使用iconv转码
# curl -o linuxidc.html www.linuxidc.com
# curl –s –o linuxidc.html www.linuxidc.com |iconv -f utf-8 #减少输出信息
例2:获取HTTP响应头headers
# curl -I https://www.linuxidc.com
# curl -D ./header.txt https://www.linuxidc.com #将headers保存到文件中
Ubuntu 用户安装下载器 cURL 7.36.0
Linux curl使用简单介绍
Unix下Curl的使用方法及常用功能记录分享
curl命令使用
更多Ubuntu相关信息见
转载自:https://www.linuxidc.com/Linux/2016-05/131574.htm
声明: 除非转自他站(如有侵权,请联系处理)外,本文采用 BY-NC-SA 协议进行授权 | 嗅谱网
转载请注明:转自《Ubuntu 16.04 及衍生版安装 cURL 7.49.0》
本文地址:http://www.xiupu.net/archives-6711.html
关注公众号:
微信赞赏
支付宝赞赏