This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10505|Reply: 2

curl command common parameters

[Copy link]
Posted on 12/17/2016 9:38:29 AM | | | |


curl is a file transfer tool that utilizes URL rules to work under the command line. It supports file upload and download, so it is a comprehensive transfer tool, but traditionally, it is customary to call the URL a download tool.

-a/--append is attached to the target file when uploading a file
-A/--user-agent <string> sets the user agent to send to the server
- AnyAuth can use "any" authentication method
-b/--cookie <name=string/file> cookie string or file read location
- basic uses HTTP basic authentication
-B/--use-ascii uses ASCII/text transfer
-c/--cookie-jar <file> to write the cookie to this file after the operation is finished
-C/--continue-at <offset> Breakpoint continue
-d/--data <data> HTTP POST transmits data
--data-ascii <data> posts data in ascii fashion
--data-binary <data> post data in binary
--negotiate uses HTTP authentication
--digest uses digital authentication
--disable-eprt EPRT or LPRT is prohibited
--disable-epsv prohibits the use of EPSV
-D/--dump-header <file> writes the header information to the file
--egd-file <file> sets the EGD socket path for Random Data (SSL).
--tcp-nodelay with TCP_NODELAY option
-e/--referer source URL
-E/--cert <cert[:p asswd]> Client certificate file and password (SSL)
--cert-type <type> certificate file type (DER/PEM/ENG) (SSL)
--key <key> private key filename (SSL)
--key-type <type> (DER/PEM/ENG) (SSL)
--pass <pass> Private Key Cipher (SSL)
--engine <eng> encryption engine uses (SSL). "--engine list" for list
--cacert <file> CA certificate (SSL)
--capath <directory> CA directory (made using c_rehash) to verify peer against (SSL)
--ciphers <list> SSL ciphers
--compressed requires that the return is compressed (using deflate or gzip)
--connect-timeout <seconds> sets the maximum request time
--create-dirs Establish a directory hierarchy for local directories
--crlf upload is to convert LF to CRLF
-f/--fail does not show an http error when the connection fails
--ftp-create-dirs Create a remote directory if it doesn't exist
--ftp-method [multicwd/nocwd/singlecwd] controls the use of CWD
--ftp-pasv uses PASV/EPSV instead of ports
--ftp-skip-pasv-ip When using PASV, ignore the IP address
--ftp-ssl attempts to use SSL/TLS for ftp data transfer
--ftp-ssl-reqd requires SSL/TLS for ftp data transfer
-F/--form <name=content> Simulates HTTP form submission data
-form-string <name=string> simulates HTTP form submission data
-g/--globoff Disables URL sequences and ranges from using {} and []
-G/--get sends data in a get way
-h/--help
-H/--header <line>custom header information is passed to the server
--ignore-content-length The length of the HTTP header information that is ignored
-i/--include output includes protocol header information
-I/--head only displays document information
Read -j/--junk-session-cookies from the file to ignore session cookies
- The interface <interface>specifies the network interface/address to use
- krb4 <级别>enables the specified security level krb4
-j/--junk-session-cookies reads the file into ignores session cookies
--interface <interface> uses the specified network interface/address
--krb4 <level> Use krb4 with a specified level of security
-k/--insecure allows the certificate to be used to the SSL site
-K/--config specified configuration file read
-l/--list-only lists the file names in the ftp directory
--limit-rate <rate> sets the transfer speed
--local-port<NUM> enforces the use of local port numbers
-m/--max-time <seconds> sets the maximum transfer time
--max-redirs <num> sets the maximum number of directories to read
--max-filesize <bytes> sets the maximum total number of downloaded files
-M/--manual shows fully manual
-n/--netrc reads the username and password from the netrc file
--netrc-optional Use .netrc or URL to override -n
--ntlm uses HTTP NTLM authentication
-N/--no-buffer disables buffered output
-o/--output to write the output to the file
-O/--remote-name writes the output to the file, keeping the file name of the remote file
-p/--proxytunnel uses HTTP proxies
--proxy-anyauth Choose either proxy authentication method
--proxy-basic uses basic authentication on the proxy
--proxy-digest uses digital authentication on the proxy
--proxy-ntlm uses ntlm authentication on the proxy
-P/--ftp-port <address> uses the port address, not PASV
-Q/--quote <cmd>sends a command to the server before the file is transferred
-r/--range <range>retrieves byte ranges from HTTP/1.1 or FTP servers
--range-file reads (SSL) random files
-R/--remote-time When generating files locally, the remote file time is preserved
--retry <num> The number of times the transmission is retried
--retry-delay <seconds> Set the retry interval when there is a problem with the transmission
--retry-max-time <seconds> When there is a problem with the transmission, set the maximum retry time
-s/--silent silent mode. Doesn't output anything
-S/--show-error displays an error
--socks4 <host[:p ort]> Proxy a given host and port with socks4
--socks5 <host[:p ort]> Use socks5 to proxy a given host and port
--stderr <file>
-t/--telnet-option <OPT=val> Telnet option setting
--trace to <file> debug the specified file
--trace-ascii <file> Like --trace but no hex output
--trace-time When tracking/verbose output, add a timestamp
-T/--upload-file <file> Upload file
--url <URL>     Spet URL to work with
-u/--user <user[:p assword]> Set the user and password for the server
-U/--proxy-user <user[:p assword]> Set the proxy username and password
-v/--verbose
-V/--version displays version information
-w/--write-out [format]what output is complete
-x/--proxy <host[:p ort]> use an HTTP proxy on a given port
-X/--request <command>specifies what command
-y/--speed-time The time it takes to abandon the speed limit. The default is 30
-Y/--speed-limit stops the limit of the transmission speed, the speed time 'seconds
-z/--time-cond teleport time setting
-0/--http1.0 uses HTTP 1.0
-1/--tlsv1 uses TLSv1 (SSL)
-2/--sslv2 (SSL) using SSLv2
-3/--sslv3 SSLv3 (SSL)
--3p-quote      like -Q for the source URL for 3rd party transfer
--3p-url uses url for third-party transmission
--3p-user uses username and password for third-party transmission
-4/--ipv4 uses IP4
-6/--ipv6 uses IP6
-#/--progress-bar displays the current transfer status with a progress bar





Previous:Windows (64-bit) download using the curl command with the tool
Next:System.ObjectDisposedException: 无法访问已释放的对象。
 Landlord| Posted on 5/28/2022 9:08:30 PM |
A method in Linux that binds host to access web pages via curl command

 Landlord| Posted on 11/29/2023 10:47:01 PM |
curl wget ignores turning off https certificate validation
https://www.itsvse.com/thread-10705-1-1.html
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com