Curl: Difference between revisions
Content added Content deleted
(div added) |
(→Switches: added more) |
||
Line 175: | Line 175: | ||
|- |
|- |
||
| --limit-rate <speed> || Specify the maximum transfer rate you want curl to use. |
| --limit-rate <speed> || Specify the maximum transfer rate you want curl to use. |
||
|- |
|||
| --max-filesize <bytes> || Specify the maximum size (in bytes) of a file to download. If larger file, curl will return with exit code 63. |
|||
|- |
|||
| --negotiate || primarily meant as a support for Kerberos5 authentication but may be also used along with another authentication methods |
|||
|- |
|||
| --ntlm || Enables NTLM authentication. |
|||
|- |
|||
| -o <file> || Write output to file instead of stdout. |
|||
|- |
|||
| -O || Write output to a local file named like the remote file we get. The file will be saved in the current working directory. |
|||
|- |
|||
| --proto <protocols> || + Permit this protocol in addition to protocols already permitted.<br /> |
|||
- Deny this protocol, removing it from the list of protocols already permitted.<br /> |
|||
= Permit only this protocol <br /> |
|||
Ex: '''--proto -ftps''' uses the default protocols, but disables ftps<br /> |
|||
'''--proto -all,https,+http''' only enables http and https<br /> |
|||
'''--proto =http,https''' also only enables http and https |
|||
|- |
|||
| --pass <phrase> || (SSL/SSH) Pass phrase for the private key. |
|||
|- |
|||
| --pubkey <key> || (SSH) Public key file name. |
|||
|- |
|||
| --retry <num> || If a transient error is returned, it will retry this number of times before giving up. Setting to 0 makes, do not retry (which is the default). |
|||
|- |
|||
| --retry-delay <seconds> || Make curl sleep this amount of time between each retry |
|||
|- |
|||
| -s || Silent mode. Don't show progress meter or error messages. |
|||
|- |
|||
| -S || When used with -s it makes curl show error message if it fails. |
|||
|- |
|||
| --ssl || Try to use SSL/TLS for the connection. Reverts to a non-secure connection if the server doesn't support SSL/TLS. |
|||
|- |
|||
| --ssl-reqd || Require SSL/TLS for the connection. Terminates the connection if the server doesn't support SSL/TLS. |
|||
|- |
|||
| -T <file> || This transfers the specified local file to the remote URL.<br /> |
|||
curl -T "{file1,file2}" http://www.uploadtothissite.com<br /> |
|||
curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/ |
|||
|- |
|||
| --trace <file> || Enables a full trace dump of all incoming and outgoing data |
|||
|- |
|||
| --trace-ascii <file> || leaves out the hex part and only shows the ASCII part of the dump. |
|||
|- |
|||
| --trace-time || Prepends a time stamp to each trace or verbose line that curl displays. |
|||
|- |
|||
| -u <user:password> || Specify user and password to use for server authentication. |
|||
|- |
|||
| -U <user:password> || Specify user and password to use for proxy authentication. |
|||
|- |
|||
| --url <URL> || Specify a URL to fetch. |
|||
|- |
|||
| -v || Makes the fetching more verbose/talkative. |
|||
|- |
|||
| -w <format> || Defines what to display on stdout after a completed and successful operation. |
|||
|- |
|||
| -x <[protocol://][user:password@]proxyhost[:port]> || Use the specified HTTP proxy. If the port number is not specified, it is assumed at port 1080. |
|||
|- |
|||
| -X <command> || Specifies a custom request method to use when communicating with the HTTP server. The specified request will be used instead of the method otherwise used (which defaults to GET) |
|||
|- |
|||
| -y <nowiki><time></nowiki> || If a download is slower than speed-limit bytes per second during a speed-time period, the download gets aborted. |
|||
|- |
|||
| -Y <speed> || If a download is slower than this given speed, in bytes per second, for speed-time seconds it gets aborted. |
|||
|- |
|||
| <nowiki>-z <date expression>|<file></nowiki> || Request a file that has been modified later than the given time and date, or one that has been modified before that time. |
|||
|- |
|||
| --max-redirs <num> || Set maximum number of redirection-followings allowed. |
|||
|} |
|} |
||