日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
Linux curl命令使用方法

curl是一個(gè)非常實(shí)用的、用來(lái)與服務(wù)器之間傳輸數(shù)據(jù)的工具;支持的協(xié)議包括 (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP),curl設(shè)計(jì)為無(wú)用戶交互下完成工作;

創(chuàng)新互聯(lián)公司專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于網(wǎng)站建設(shè)、成都網(wǎng)站建設(shè)、武義網(wǎng)絡(luò)推廣、微信小程序開(kāi)發(fā)、武義網(wǎng)絡(luò)營(yíng)銷(xiāo)、武義企業(yè)策劃、武義品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運(yùn)營(yíng)等,從售前售中售后,我們都將竭誠(chéng)為您服務(wù),您的肯定,是我們最大的嘉獎(jiǎng);創(chuàng)新互聯(lián)公司為所有大學(xué)生創(chuàng)業(yè)者提供武義建站搭建服務(wù),24小時(shí)服務(wù)熱線:18980820575,官方網(wǎng)址:www.cdcxhl.com

curl工具常用選項(xiàng)高數(shù)

語(yǔ)法格式:
  curl [options] [URL...]


常用選項(xiàng)如下所示:
  -A/--user-agent 
  
   :     設(shè)置用戶代理發(fā)送給服務(wù)器   -e/--referer 
   
    :     來(lái)源網(wǎng)址   --cacert 
    
     :     CA證書(shū) (SSL)   -k/--insecure:     允許忽略證書(shū)進(jìn)行 SSL 連接   --compressed:     要求返回是壓縮的格式   -H/--header 
     
      :     自定義首部信息傳遞給服務(wù)器   -i:     顯示頁(yè)面內(nèi)容,包括報(bào)文首部信息   -I/--head:     只顯示響應(yīng)報(bào)文首部信息   -D/--dump-header 
      
       :     將url的header信息存放在指定文件中   --basic:     使用HTTP基本認(rèn)證   -u/--user 
       
        :     設(shè)置服務(wù)器的用戶和密碼   -L:     如果有3xx響應(yīng)碼,重新發(fā)請(qǐng)求到新位置     -O:     使用URL中默認(rèn)的文件名保存文件到本地   -o 
        
         :     將網(wǎng)絡(luò)文件保存為指定的文件中   --
         limit-rate 
         
          :     設(shè)置傳輸速度   -0/--http1.0:     數(shù)字0,使用HTTP 1.0   -v/--verbose:     更詳細(xì)   -C:     選項(xiàng)可對(duì)文件使用斷點(diǎn)續(xù)傳功能   -c/--cookie-jar 
          
           :     將url中cookie存放在指定文件中   -x/--proxy 
           
            :     指定代理服務(wù)器地址   -X/--request command>:     向服務(wù)器發(fā)送指定請(qǐng)求方法   -U/--proxy-user 
            
             :     代理服務(wù)器用戶和密碼   -T:     選項(xiàng)可將指定的本地文件上傳到FTP服務(wù)器上   --data/-d:     方式指定使用POST方式傳遞數(shù)據(jù)   -b name=data:     從服務(wù)器響應(yīng)
             set-cookie得到值,返回給服務(wù)器
            
           
          
         
        
       
      
     
    
   

curl命令測(cè)試HTTP協(xié)議實(shí)戰(zhàn)案例

1>.”-A/–user-agent “案例

[root@node101.yinzhengjie.org.cn ~]# curl -A 'Chrome/78.0.3904.108 Safari/537.36' http://node107.yinzhengjie.org.cn          #設(shè)置用戶代理發(fā)送給服務(wù)器,其實(shí)就是封裝了請(qǐng)求報(bào)文中的"User-Agent"參數(shù),可以結(jié)合"-v"選項(xiàng)查看的更詳細(xì)。

尹正杰到此一游

[root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# curl --user-agent 'Firefox/108 ' http://node107.yinzhengjie.org.cn

尹正杰到此一游

[root@node101.yinzhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# ss -tnl
State       Recv-Q Send-Q                         Local Address:Port                                        Peer Address:Port              
LISTEN      0      128                                        *:80                                                     *:*                  
LISTEN      0      128                                        *:22                                                     *:*                  
LISTEN      0      128                                       :::22                                                    :::*                  
[root@node107.yizhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# ll /var/www/html/index.html
-rw-r--r-- 1 root root 31 Dec 10 22:17 /var/www/html/index.html
[root@node107.yizhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# cat /var/www/html/index.html

尹正杰到此一游

[root@node107.yizhengjie.org.cn ~]# [root@node107.yizhengjie.org.cn ~]# tail -10f /var/log/httpd/access_log               #查看服務(wù)端日志,觀察請(qǐng)求日志信息 ...... 172.30.1.101 - - [10/Dec/2019:22:22:42 +0800] "GET / HTTP/1.1" 200 31 "-" "Chrome/78.0.3904.108 Safari/537.36" 172.30.1.101 - - [10/Dec/2019:22:27:59 +0800] "GET / HTTP/1.1" 200 31 "-" "Firefox/108"

[root@node107.yizhengjie.org.cn ~]# tail -10f /var/log/httpd/access_log               #查看服務(wù)端日志,觀察請(qǐng)求日志信息,觀察服務(wù)端是否有上面記錄中的User-Agent參數(shù)記錄。

2>.”-v/–verbose”案例顯示一次的http請(qǐng)求的通信過(guò)程

[root@node101.yinzhengjie.org.cn ~]# curl -A 'Chrome/78.0.3904.108 Safari/537.36' http://node107.yinzhengjie.org.cn -v      #顯示http請(qǐng)求的通信過(guò)程,包括request,response,以及正文。
* About to connect() to node107.yinzhengjie.org.cn port 80 (#0)
*   Trying 172.30.1.107...
* Connected to node107.yinzhengjie.org.cn (172.30.1.107) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: Chrome/78.0.3904.108 Safari/537.36
> Host: node107.yinzhengjie.org.cn
> Accept: */*
>
"1f-5995a2a997640"
尹正杰到此一游
* Connection #0 to host node107.yinzhengjie.org.cn left intact
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]#

3>.”-e/–referer “案例

[root@node101.yinzhengjie.org.cn ~]# curl -e "www.baidu.com" http://node107.yinzhengjie.org.cn -v             #指定來(lái)源網(wǎng)址為"www.baidu.com"
* About to connect() to node107.yinzhengjie.org.cn port 80 (#0)
*   Trying 172.30.1.107...
* Connected to node107.yinzhengjie.org.cn (172.30.1.107) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: node107.yinzhengjie.org.cn
> Accept: */*
> Referer: www.baidu.com
>
"1f-5995a2a997640"
尹正杰到此一游
* Connection #0 to host node107.yinzhengjie.org.cn left intact
[root@node101.yinzhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# ss -tnl
State       Recv-Q Send-Q                         Local Address:Port                                        Peer Address:Port              
LISTEN      0      128                                        *:80                                                     *:*                  
LISTEN      0      128                                        *:22                                                     *:*                  
LISTEN      0      128                                       :::22                                                    :::*                  
[root@node107.yizhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# ll /var/www/html/index.html
-rw-r--r-- 1 root root 31 Dec 10 22:17 /var/www/html/index.html
[root@node107.yizhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# cat /var/www/html/index.html

尹正杰到此一游

[root@node107.yizhengjie.org.cn ~]# [root@node107.yizhengjie.org.cn ~]# tail -10f /var/log/httpd/access_log               #查看服務(wù)端日志,觀察請(qǐng)求日志信息 ...... 172.30.1.101 - - [10/Dec/2019:22:45:15 +0800] "GET / HTTP/1.1" 200 31 "www.baidu.com" "curl/7.29.0"

[root@node107.yizhengjie.org.cn ~]# tail -10f /var/log/httpd/access_log               #查看服務(wù)端日志,觀察請(qǐng)求日志信息,觀察服務(wù)端是否有上面記錄中的User-Agent參數(shù)記錄。

4>.”-I/–head”案例

[root@node101.yinzhengjie.org.cn ~]# curl -I http://node107.yinzhengjie.org.cn           #只顯示響應(yīng)報(bào)文首部信息
HTTP/1.1 200 OK
Date: Tue, 10 Dec 2019 14:52:36 GMT
Server: Apache/2.4.6 (CentOS) PHP/5.4.16
Last-Modified: Tue, 10 Dec 2019 14:17:04 GMT
ETag: "1f-5995a2a997640"
Accept-Ranges: bytes
Content-Length: 31
Content-Type: text/html; charset=UTF-8

[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# curl --head http://node107.yinzhengjie.org.cn
HTTP/1.1 200 OK
Date: Tue, 10 Dec 2019 14:52:45 GMT
Server: Apache/2.4.6 (CentOS) PHP/5.4.16
Last-Modified: Tue, 10 Dec 2019 14:17:04 GMT
ETag: "1f-5995a2a997640"
Accept-Ranges: bytes
Content-Length: 31
Content-Type: text/html; charset=UTF-8

[root@node101.yinzhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# ss -tnl
State       Recv-Q Send-Q                         Local Address:Port                                        Peer Address:Port              
LISTEN      0      128                                        *:80                                                     *:*                  
LISTEN      0      128                                        *:22                                                     *:*                  
LISTEN      0      128                                       :::22                                                    :::*                  
[root@node107.yizhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# ll /var/www/html/index.html
-rw-r--r-- 1 root root 31 Dec 10 22:17 /var/www/html/index.html
[root@node107.yizhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# cat /var/www/html/index.html

尹正杰到此一游

[root@node107.yizhengjie.org.cn ~]# [root@node107.yizhengjie.org.cn ~]# tail -10f /var/log/httpd/access_log               #查看服務(wù)端日志,觀察請(qǐng)求日志信息 ...... 172.30.1.101 - - [10/Dec/2019:22:52:36 +0800] "HEAD / HTTP/1.1" 200 - "-" "curl/7.29.0" 172.30.1.101 - - [10/Dec/2019:22:52:45 +0800] "HEAD / HTTP/1.1" 200 - "-" "curl/7.29.0"

[root@node107.yizhengjie.org.cn ~]# tail -10f /var/log/httpd/access_log               #查看服務(wù)端日志,觀察請(qǐng)求日志信息,觀察服務(wù)端是否有上面記錄中的User-Agent參數(shù)記錄。

5>.”-i”案例

[root@node101.yinzhengjie.org.cn ~]# curl -i http://node107.yinzhengjie.org.cn               #顯示頁(yè)面內(nèi)容,包括報(bào)文首部信息
HTTP/1.1 200 OK
Date: Tue, 10 Dec 2019 14:54:52 GMT
Server: Apache/2.4.6 (CentOS) PHP/5.4.16
Last-Modified: Tue, 10 Dec 2019 14:17:04 GMT
ETag: "1f-5995a2a997640"
Accept-Ranges: bytes
Content-Length: 31
Content-Type: text/html; charset=UTF-8

尹正杰到此一游

[root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# ss -tnl
State       Recv-Q Send-Q                         Local Address:Port                                        Peer Address:Port              
LISTEN      0      128                                        *:80                                                     *:*                  
LISTEN      0      128                                        *:22                                                     *:*                  
LISTEN      0      128                                       :::22                                                    :::*                  
[root@node107.yizhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# ll /var/www/html/index.html
-rw-r--r-- 1 root root 31 Dec 10 22:17 /var/www/html/index.html
[root@node107.yizhengjie.org.cn ~]#
[root@node107.yizhengjie.org.cn ~]# cat /var/www/html/index.html

尹正杰到此一游

[root@node107.yizhengjie.org.cn ~]# [root@node107.yizhengjie.org.cn ~]# tail -10f /var/log/httpd/access_log               #查看服務(wù)端日志,觀察請(qǐng)求日志信息 ...... 172.30.1.101 - - [10/Dec/2019:22:54:52 +0800] "GET / HTTP/1.1" 200 31 "-" "curl/7.29.0"

[root@node107.yizhengjie.org.cn ~]# tail -10f /var/log/httpd/access_log               #查看服務(wù)端日志,觀察請(qǐng)求日志信息,觀察服務(wù)端是否有上面記錄中的User-Agent參數(shù)記錄。

6>.”–cacert “案例

[root@node101.yinzhengjie.org.cn ~]# curl https://www.yinzhengjie.org.cn --cacert /etc/httpd/conf.d/ssl/cacert.pem         #使用證書(shū)檢查訪問(wèn)網(wǎng)頁(yè)

尹正杰到此一游

[root@node101.yinzhengjie.org.cn ~]#

7>.”-k/–insecure”案例

[root@node101.yinzhengjie.org.cn ~]# curl -k https://www.yinzhengjie.org.cn --cacert /etc/httpd/conf.d/ssl/cacert.pem       #忽略證書(shū)檢查訪問(wèn)網(wǎng)頁(yè)

尹正杰到此一游

[root@node101.yinzhengjie.org.cn ~]#

8>.”-c/–cookie-jar “案例

復(fù)制代碼

[root@node101.yinzhengjie.org.cn ~]# curl -c /root/cookie.txt http://node107.yinzhengjie.org.cn/setcookie.php         # 將url中cookie存放在指定文件中
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# cat /root/cookie.txt
# Netscape HTTP Cookie File
# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

node107.yinzhengjie.org.cn    FALSE    /    FALSE    0    department    IT
node107.yinzhengjie.org.cn    FALSE    /    FALSE    1575993782    user    Jason
[root@node101.yinzhengjie.org.cn ~]#

9>.”-X/–request “案例

[root@node101.yinzhengjie.org.cn ~]# curl -X PUT www.baidu.com          #向服務(wù)端發(fā)送指定請(qǐng)求的方法,此處我們指定的方法是PUT,下面依次提交的方法是GET,DELETE以及POST方法。
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# curl -X GET www.baidu.com
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# curl -X DELETE www.baidu.com
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# curl -X POST www.baidu.com
[root@node101.yinzhengjie.org.cn ~]#

10>.”-D/–dump-header “案例

[root@node101.yinzhengjie.org.cn ~]# ll
total 0
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# curl -D yinzhengjie.html http://node107.yinzhengjie.org.cn               #顯示整個(gè)網(wǎng)頁(yè)數(shù)據(jù),并將響應(yīng)頭信息存入yinzhengjie.html

尹正杰到此一游

[root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# ll total 4 -rw-r--r-- 1 root root 252 Dec 10 23:35 yinzhengjie.html [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# cat yinzhengjie.html HTTP/1.1 200 OK Date: Tue, 10 Dec 2019 15:35:18 GMT Server: Apache/2.4.6 (CentOS) PHP/5.4.16 Last-Modified: Tue, 10 Dec 2019 14:17:04 GMT ETag: "1f-5995a2a997640" Accept-Ranges: bytes Content-Length: 31 Content-Type: text/html; charset=UTF-8 [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]#

11>.”-u/–user [user:password]“案例

  如下圖所示,我用自己的用戶名登陸我們公司的OA賬號(hào)信息。

12>.查看幫助

[root@node101.yinzhengjie.org.cn ~]# curl --help
Usage: curl [options...] 
  
    Options: (H) means HTTP/HTTPS only, (F) means FTP only     --anyauth       Pick 
   "any" authentication method (H) -a, --append        Append to target file when uploading (F/SFTP)     --basic         Use HTTP Basic Authentication (H)     --cacert FILE   CA certificate to verify peer against (SSL)     --capath DIR    CA directory to verify peer against (SSL) -E, --cert CERT[:PASSWD] Client certificate file and password (SSL)     --cert-type TYPE Certificate file 
   type (DER/PEM/ENG) (SSL)     --ciphers LIST  SSL ciphers to use (SSL)     --compressed    Request compressed response (using deflate or gzip) -K, --config FILE   Specify 
   which config file to 
   read     --connect-timeout SECONDS  Maximum time allowed 
   for connection -C, --
   continue-at OFFSET  Resumed transfer offset -b, --cookie STRING/FILE  String or file to 
   read cookies from (H) -c, --cookie-jar FILE  Write cookies to this file after operation (H)     --create-dirs   Create necessary 
   local directory hierarchy     --crlf          Convert LF to CRLF 
   in upload     --crlfile FILE  Get a CRL list 
   in PEM format from the given file -d, --data DATA     HTTP POST data (H)     --data-ascii DATA  HTTP POST ASCII data (H)     --data-binary DATA  HTTP POST binary data (H)     --data-urlencode DATA  HTTP POST data url encoded (H)     --delegation STRING GSS-API delegation permission     --digest        Use HTTP Digest Authentication (H)     --
   disable-eprt  Inhibit using EPRT or LPRT (F)     --
   disable-epsv  Inhibit using EPSV (F) -D, --dump-header FILE  Write the headers to this file     --egd-file FILE  EGD socket path 
   for random data (SSL)     --engine ENGINGE  Crypto engine (SSL). 
   "--engine list" 
   for list -f, --fail          Fail silently (no output at all) on HTTP errors (H) -F, --form CONTENT  Specify HTTP multipart POST data (H)     --form-string STRING  Specify HTTP multipart POST data (H)     --ftp-account DATA  Account data string (F)     --ftp-alternative-to-user COMMAND  String to replace 
   "USER [name]" (F)     --ftp-create-dirs  Create the remote 
   dirs 
   if not present (F)     --ftp-method [MULTICWD/NOCWD/SINGLECWD] Control CWD usage (F)     --ftp-pasv      Use PASV/EPSV instead of PORT (F) -P, --ftp-port ADR  Use PORT with given address instead of PASV (F)     --ftp-skip-pasv-ip Skip the IP address 
   for PASV (F)     --ftp-pret      Send PRET before PASV (
   for drftpd) (F)     --ftp-ssl-ccc   Send CCC after authenticating (F)     --ftp-ssl-ccc-mode ACTIVE/PASSIVE  Set CCC mode (F)     --ftp-ssl-control Require SSL/TLS 
   for ftp login, clear 
   for transfer (F) -G, --get           Send the -d data with a HTTP GET (H) -g, --globoff       Disable URL sequences and ranges using {} and [] -H, --header LINE   Custom header to pass to server (H) -I, --head          Show document info only -h, --
   help          This 
   help text     --hostpubmd5 MD5  Hex encoded MD5 string of the host public key. (SSH) -0, --http1.0       Use HTTP 1.0 (H)     --ignore-content-length  Ignore the HTTP Content-Length header -i, --include       Include protocol headers 
   in the output (H/F) -k, --insecure      Allow connections to SSL sites without certs (H)     --interface INTERFACE  Specify network interface/address to use -4, --ipv4          Resolve name to IPv4 address -6, --ipv6          Resolve name to IPv6 address -j, --junk-session-cookies Ignore session cookies 
   read from file (H)     --keepalive-time SECONDS  Interval between keepalive probes     --key KEY       Private key file name (SSL/SSH)     --key-type TYPE Private key file 
   type (DER/PEM/ENG) (SSL)     --krb LEVEL     Enable Kerberos with specified security level (F)     --libcurl FILE  Dump libcurl equivalent code of this 
   command line     --
   limit-rate RATE  Limit transfer speed to this rate -l, --list-only     List only names of an FTP directory (F)     --
   local-port RANGE  Force use of these 
   local port numbers -L, --location      Follow redirects (H)     --location-trusted like --location and send auth to other hosts (H) -M, --manual        Display the full manual     --mail-from FROM  Mail from this address     --mail-rcpt TO  Mail to this receiver(s)     --mail-auth AUTH  Originator address of the original email     --max-filesize BYTES  Maximum file size to download (H/F)     --max-redirs NUM  Maximum number of redirects allowed (H) -m, --max-time SECONDS  Maximum time allowed 
   for the transfer     --metalink      Process given URLs as metalink XML file     --negotiate     Use HTTP Negotiate Authentication (H) -n, --netrc         Must 
   read .netrc 
   for user name and password     --netrc-optional Use either .netrc or URL; overrides -n     --netrc-file FILE  Set up the netrc filename to use -N, --no-buffer     Disable buffering of the output stream     --no-keepalive  Disable keepalive use on the connection     --no-sessionid  Disable SSL session-ID reusing (SSL)     --noproxy       List of hosts 
   which 
   do not use proxy     --ntlm          Use HTTP NTLM authentication (H) -o, --output FILE   Write output to 
   
     instead of stdout     --pass PASS     Pass phrase 
    for the private key (SSL/SSH)     --post301       Do not switch to GET after following a 301 redirect (H)     --post302       Do not switch to GET after following a 302 redirect (H)     --post303       Do not switch to GET after following a 303 redirect (H) -
    #, --progress-bar  Display transfer progress as a progress bar     --proto PROTOCOLS  Enable/
    disable specified protocols     --proto-redir PROTOCOLS  Enable/
    disable specified protocols on redirect -x, --proxy [PROTOCOL://]HOST[:PORT] Use proxy on given port     --proxy-anyauth Pick 
    "any" proxy authentication method (H)     --proxy-basic   Use Basic authentication on the proxy (H)     --proxy-digest  Use Digest authentication on the proxy (H)     --proxy-negotiate Use Negotiate authentication on the proxy (H)     --proxy-ntlm    Use NTLM authentication on the proxy (H) -U, --proxy-user USER[:PASSWORD]  Proxy user and password     --proxy1.0 HOST[:PORT]  Use HTTP/1.0 proxy on given port -p, --proxytunnel   Operate through a HTTP proxy tunnel (using CONNECT)     --pubkey KEY    Public key file name (SSH) -Q, --quote CMD     Send 
    command(s) to server before transfer (F/SFTP)     --random-file FILE  File 
    for reading random data from (SSL) -r, --range RANGE   Retrieve only the bytes within a range     --raw           Do HTTP 
    "raw", without any transfer decoding (H) -e, --referer       Referer URL (H) -J, --remote-header-name Use the header-provided filename (H) -O, --remote-name   Write output to a file named as the remote file     --remote-name-all Use the remote file name 
    for all URLs -R, --remote-time   Set the remote file
    's time on the local output -X, --request COMMAND  Specify request command to use     --resolve HOST:PORT:ADDRESS  Force resolve of HOST:PORT to ADDRESS     --retry NUM   Retry request NUM times if transient problems occur     --retry-delay SECONDS When retrying, wait this many seconds between each     --retry-max-time SECONDS  Retry only within this period -S, --show-error    Show error. With -s, make curl show errors when they occur -s, --silent        Silent mode. Don't output anything     --socks4 HOST[:PORT]  SOCKS4 proxy on given host + port     --socks4a HOST[:PORT]  SOCKS4a proxy on given host + port     --socks5 HOST[:PORT]  SOCKS5 proxy on given host + port     --socks5-basic  Enable username/password auth 
    for SOCKS5 proxies     --socks5-gssapi Enable GSS-API auth 
    for SOCKS5 proxies     --socks5-hostname HOST[:PORT] SOCKS5 proxy, pass host name to proxy     --socks5-gssapi-service NAME  SOCKS5 proxy service name 
    for gssapi     --socks5-gssapi-nec  Compatibility with NEC SOCKS5 server -Y, --speed-limit RATE  Stop transfers below speed-limit 
    for 
    'speed-time' secs -y, --speed-time SECONDS  Time 
    for trig speed-limit abort. Defaults to 30     --ssl           Try SSL/TLS (FTP, IMAP, POP3, SMTP)     --ssl-reqd      Require SSL/TLS (FTP, IMAP, POP3, SMTP) -2, --sslv2         Use SSLv2 (SSL) -3, --sslv3         Use SSLv3 (SSL)     --ssl-allow-beast Allow security flaw to improve interop (SSL)     --stderr FILE   Where to redirect stderr. - means stdout     --tcp-nodelay   Use the TCP_NODELAY option -t, --telnet-option OPT=VAL  Set telnet option     --tftp-blksize VALUE  Set TFTP BLKSIZE option (must be >512) -z, --time-cond TIME  Transfer based on a time condition -1, --tlsv1         Use => TLSv1 (SSL)     --tlsv1.0       Use TLSv1.0 (SSL)     --tlsv1.1       Use TLSv1.1 (SSL)     --tlsv1.2       Use TLSv1.2 (SSL)     --trace FILE    Write a debug trace to the given file     --trace-ascii FILE  Like --trace but without the hex output     --trace-time    Add time stamps to trace/verbose output     --tr-encoding   Request compressed transfer encoding (H) -T, --upload-file FILE  Transfer FILE to destination     --url URL       URL to work with -B, --use-ascii     Use ASCII/text transfer -u, --user USER[:PASSWORD]  Server user and password     --tlsuser USER  TLS username     --tlspassword STRING TLS password     --tlsauthtype STRING  TLS authentication 
    type (default SRP)     --unix-socket FILE    Connect through this UNIX domain socket -A, --user-agent STRING  User-Agent to send to server (H) -v, --verbose       Make the operation more talkative -V, --version       Show version number and quit -w, --write-out FORMAT  What to output after completion     --xattr        Store metadata 
    in extended file attributes -q                 If used as the first parameter disables .curlrc [root@node101.yinzhengjie.org.cn ~]
    # re 
   

[root@node101.yinzhengjie.org.cn ~]# curl –help

elinks工具

1>.安裝elinks工具

[root@node101.yinzhengjie.org.cn ~]# yum -y install elinks
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                                                  | 8.6 kB  00:00:00    
* base: mirrors.huaweicloud.com
* epel: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.huaweicloud.com
* updates: mirrors.huaweicloud.com
base                                                                                                                  | 3.6 kB  00:00:00    
epel                                                                                                                  | 5.3 kB  00:00:00    
extras                                                                                                                | 2.9 kB  00:00:00    
updates                                                                  
文章名稱:Linux curl命令使用方法
分享地址:http://www.dlmjj.cn/article/djjojce.html