天天看點

curl 指令

curl指令是一個利用URL規則在指令行下工作的檔案傳輸工具。它支援檔案的上傳和下載下傳,是以是綜合傳輸工具,但按傳統,習慣稱curl為下載下傳工具。作為一款強力工具,curl支援包括HTTP、HTTPS、ftp等衆多協定,還支援POST、cookies、認證、從指定偏移處下載下傳部分檔案、使用者代理字元串、限速、檔案大小、進度條等特征。做網頁處理流程和資料檢索自動化,curl可以祝一臂之力。

文法

選項

-a/--append

-A/--user-agent <agent string>

--anyauth

-b/--cookie <name=string/file>

    --basic

-B/--use-ascii

-c/--cookie-jar <file name>

-C/--continue-at <offset>

-d/--data <data>

    --data-ascii <data>

    --data-binary <data>

    --negotiate

    --digest

    --disable-eprt

    --disable-epsv

-D/--dump-header <file>

     --egd-file <file>

     --tcp-nodelay

-e/--referer

-E/--cert <certificate[:password]>

    --cert-type <type>

    --key<type>

    --pass<pass>

    --engine<eng>

    --cacert<file>

    --capath<directory>

    --ciphers<list>

    --compressed

    --connect-timeout<seconds>

    --create-dirs

     --crlf

本文轉自 小楊_Ivan 51CTO部落格,原文連結:http://blog.51cto.com/aqiang/1895091

繼續閱讀