The Curl command uses the record

Source: Internet
Author: User
Tags add time ftp login http digest authentication http post ftp transfer

Curl Usage Record

Curl is a file transfer tool that works under the command line using URL rules, it supports file uploads and downloads, so it's a comprehensive transfer tool, used to call curl as a download tool

Curl Syntax Command:

[ [email protected] test]# curl-husage:curl [Options ...] <url>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 <directory>CA directory to verify peer against (SSL)-e/--cert <cert[:p asswd]> Client certificate file andpassword (SSL)--cert-type <type> Certificate file type (der/pem/ENG) (SSL)--ciphers <list>SSL ciphers to use (SSL)--compressed Request Compressed response (using deflateorgzip)-k/--config <file>specify which config file to read--connect-timeout <seconds> Maximum time allowed forConnection-c/--Continue-at <offset> resumed transfer offset
Continuation of a breakpoint, the second-indicates that the corresponding file is automatically found, or you can specify the name directly
Curl-c-o URL
-b/--cookie <name=string/file> Cookie StringorFile to read cookies from(H)-c/--cookie-jar <file>Write Cookies to the This file after operation (H)--create-dirs Create necessary local directory hierarchy--crlf Convert LF to CRLFinchUpload--crlfile <file> Get a CRL listinchPEM format fromThe 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 <name=data/[email protected]> 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 forrandom Data (SSL)--engine <eng> Crypto engine to use (SSL)."--engine List" forList-f/--fail fail silently (no output at all) on HTTP errors (H)-f/--form <name=content>Specify HTTP multipart POST data (H)--form-string <name=string>Specify HTTP multipart POST data (H)--ftp-account <data>Account data to send when requested by Server (F)--ftp-alternative-to-user <cmd> String to replace"USER [name]"(F)--ftp-create-dirs Create the remote dirsif notpresent (F)--ftp-method [multicwd/nocwd/SINGLECWD] Control CWD Usage (F)--FTP-PASV Use pasv/EPSV instead of PORT (F)-p/--ftp-port <address>Use PORT with address instead of PASV (F)--ftp-skip-pasv-ip Skip the IP address forPASV (F)--FTP-SSL Try SSL/TLS forFTP Transfer (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 forFTP Login, clear forTransfer (F)--FTP-SSL-REQD Require SSL/TLS forFTP Transfer (F)-g/--get Send the-d data with a HTTP GET (H)-g/--globoff Disable URL Sequences andRanges using {} and [] -h/--header <line> Custom header to pass to server (H) -i/--Head Show Document info only-h/--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 headersinchThe 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 fromfile (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
Limit transfer rate, in bytes per unit (B)
-l/--list-Only List names of an FTP directory (F)--local-port <num>[-Num] Force use of these local port numbers-l/--locationfollow location:hints (H) --location-trusted follow location: and Send auth to other hosts (H)
Access to the redirected URL, such as Access www.google.com, will return 302 redirect to www.google.com.hk
root #> Curl http://www.google.com -m/--manual Display the full manual--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 forThe transfer--Negotiate use HTTP Negotiate authentication (H)-N/--NETRC must read. netrc forUser name andPassword--netrc-optional use either. netrcorURL; Overrides-N-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 comma-separated List of hosts which do notUse proxy--NTLM use HTTP NTLM authentication (H)--Pass<Pass> Pass Phrase forThe private key (ssl/SSH)--post301 do notSwitch to GET after following a 301Redirect (H)--post302 do notSwitch to GET after following a 302Redirect (H)-#/--progress-bar Display Transfer Progress as a progress bar-x/--proxy Use HTTP 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[:p assword]> Set Proxy User andPassword--proxy1.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 file transfer (f/SFTP)--random-file <file> File forReading random Data from(SSL)-r/--range <range>Retrieve only the bytes within a range--raw Pass HTTP"Raw", without any transfer decoding (H)-e/--referer referer URL (H)-o/--remote-name Write output to a file named as the remote file --remote-name-all use the remote file Name forAll URLs
Import the standard output into a file and use the remote file name as the file name, you can get multiple files at the same time, each URL must be added to the-o parameter, otherwise do not save
Get multiple URLs at the same time and save the output of all URLs to a local file with the same remote file name
root# > Curl-o http://www.cnblogs.com/lvxiaobo616/p/5636006.html-O http://www.cnblogs.com/lvxiaobo616/p /6612900.html
root# > Curl--remote-name-all
Http://www.cnblogs.com/lvxiaobo616/p/5636006.html-O http://www.cnblogs.com/lvxiaobo616/p/6612900.html
-r/--remote-time Set the remote file's time on the local output
-x/--request <command> Specify request command to use
--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 Port
--socks4a Port
--SOCKS5 Port
--socks5-hostname PassHost name to Proxy
--socks5-gssapi-service <name> SOCKS5 Proxy service Name forGSSAPI-
-socks5-gssapi-NEC compatibility with NEC SOCKS5 server
-y/--speed-limit Stop TransferifBelow Speed-limit for 'Speed-time'secs
-y/--speed-time time needed to trig speed-limit abort. Defaults to 30
-2/--Sslv2 use SSLv2 (SSL)
-3/--SSLv3 use SSLv3 (SSL)
--stderr <file> Where to redirect stderr. -means stdout
--tcp-nodelay Use the Tcp_nodelay option
-t/--telnet-option <OPT=val>Set telnet option
-z/--time-cond <time>Transfer based on a time condition
-1/--TLSv1 use TLSV1 (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
-t/--upload-file <file> Transfer <file>to remote site
--url <URL>Set URL to work with
-b/--use-ascii Use ascii/Text Transfer
-u/--user <user[:p assword]> Set Server user andPassword
-a/--user-agent <string> user-Agent to send to server (H)
-v/-- verbose make the operation more talkative
-v/--version Show Version number andquit
-w/--write-out <format>What to output after completion
-Q If used as the first parameter disables. CURLRC

The Curl command uses the record

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.