Skip to content
Snippets Groups Projects
curl.1 59.7 KiB
Newer Older
means additional info provided by curl.
Daniel Stenberg's avatar
Daniel Stenberg committed
Note that if you only want HTTP headers in the output, \fI-i/--include\fP
If you think this option still doesn't give you enough details, consider using
\fI--trace\fP or \fI--trace-ascii\fP instead.

If this option is used twice, the second will again disable verbose.
.IP "-V/--version"
Displays information about curl and the libcurl version it uses.

The first line includes the full version of curl, libcurl and other 3rd party
libraries linked with the executable.

The second line (starts with "Protocols:") shows all protocols that libcurl
reports to support.

The third line (starts with "Features:") shows specific features libcurl
reports to offer. Available features include:
.RS
.IP "IPv6"
You can use IPv6 with this.
.IP "krb4"
Krb4 for ftp is supported.
.IP "SSL"
HTTPS and FTPS are supported.
.IP "libz"
Automatic decompression of compressed files over HTTP is supported.
.IP "NTLM"
NTLM authentication is supported.
Negotiate authentication is supported.
.IP "Debug"
This curl uses a libcurl built with Debug. This enables more error-tracking
and memory debugging etc. For curl-developers only!
.IP "AsynchDNS"
This curl uses asynchronous name resolves.
.IP "SPNEGO"
SPNEGO Negotiate authentication is supported.
.IP "Largefile"
This curl supports transfers of large files, files larger than 2GB.
.IP "IDN"
This curl supports IDN - international domain names.
Daniel Stenberg's avatar
Daniel Stenberg committed
.IP "SSPI"
SSPI is supported. If you use NTLM and set a blank user name, curl will
authenticate with your current user and password.
.IP "-w/--write-out <format>"
Defines what to display on stdout after a completed and successful
operation. The format is a string that may contain plain text mixed with any
number of variables. The string can be specified as "string", to get read from
a particular file you specify it "@filename" and to tell curl to read the
format from stdin you write "@-".

The variables present in the output format will be substituted by the value or
text that curl thinks fit, as described below. All variables are specified
like %{variable_name} and to output a normal % you just write them like
%%. You can output a newline by using \\n, a carriage return with \\r and a tab
space with \\t.

.B NOTE:
The %-letter is a special letter in the win32-environment, where all
occurrences of % must be doubled when using this option.

Available variables are at this point:
.RS
.TP 15
.B url_effective
The URL that was fetched last. This is mostly meaningful if you've told curl
to follow location: headers.
.TP
.B http_code
The numerical code that was found in the last retrieved HTTP(S) page.
.TP
.B http_connect
The numerical code that was found in the last response (from a proxy) to a
curl CONNECT request. (Added in 7.12.4)
.TP
.B time_total
The total time, in seconds, that the full operation lasted. The time will be
displayed with millisecond resolution.
.TP
.B time_namelookup
The time, in seconds, it took from the start until the name resolving was
completed.
.TP
.B time_connect
The time, in seconds, it took from the start until the connect to the remote
host (or proxy) was completed.
.TP
.B time_pretransfer
The time, in seconds, it took from the start until the file transfer is just
about to begin. This includes all pre-transfer commands and negotiations that
are specific to the particular protocol(s) involved.
.TP
.B time_redirect
The time, in seconds, it took for all redirection steps include name lookup,
connect, pretransfer and transfer before final transaction was
started. time_redirect shows the complete execution time for multiple
redirections. (Added in 7.12.3)
.TP
.B time_starttransfer
The time, in seconds, it took from the start until the first byte is just about
to be transferred. This includes time_pretransfer and also the time the
server needs to calculate the result.
.TP
.B size_download
The total amount of bytes that were downloaded.
.TP
.B size_upload
The total amount of bytes that were uploaded.
.TP
.B size_header
The total amount of bytes of the downloaded headers.
.TP
.B size_request
The total amount of bytes that were sent in the HTTP request.
.TP
.B speed_download
The average download speed that curl measured for the complete download.
.TP
.B speed_upload
The average upload speed that curl measured for the complete upload.
The Content-Type of the requested document, if there was any.
Daniel Stenberg's avatar
Daniel Stenberg committed
.TP
.B num_connects
Number of new connects made in the recent transfer. (Added in 7.12.3)
.TP
.B num_redirects
Number of redirects that were followed in the request. (Added in 7.12.3)
.TP
.B ftp_entry_path
The initial path libcurl ended up in when logging on to the remote FTP
server. (Added in 7.15.4)
Daniel Stenberg's avatar
Daniel Stenberg committed
If this option is used several times, the last one will be used.
.IP "-x/--proxy <proxyhost[:port]>"
Use specified HTTP proxy. If the port number is not specified, it is assumed
at port 1080.

Daniel Stenberg's avatar
Daniel Stenberg committed
This option overrides existing environment variables that sets proxy to
use. If there's an environment variable setting a proxy, you can set proxy to
\&"" to override it.
\fBNote\fP that all operations that are performed over a HTTP proxy will
transparently be converted to HTTP. It means that certain protocol specific
operations might not be available. This is not the case if you can tunnel
through the proxy, as done with the \fI-p/--proxytunnel\fP option.
Starting with 7.14.1, the proxy host can be specified the exact same way as
the proxy environment variables, include protocol prefix (http://) and
embedded user + password.

Daniel Stenberg's avatar
Daniel Stenberg committed
If this option is used several times, the last one will be used.
.IP "-X/--request <command>"
(HTTP) 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). Read the HTTP 1.1 specification for
details and explanations.

(FTP)
Specifies a custom FTP command to use instead of LIST when doing file lists
with ftp.
Daniel Stenberg's avatar
Daniel Stenberg committed
If this option is used several times, the last one will be used.
.IP "-y/--speed-time <time>"
If a download is slower than speed-limit bytes per second during a speed-time
period, the download gets aborted. If speed-time is used, the default
speed-limit will be 1 unless set with -y.
This option controls transfers and thus will not affect slow connects etc. If
this is a concern for you, try the \fI--connect-timeout\fP option.

Daniel Stenberg's avatar
Daniel Stenberg committed
If this option is used several times, the last one will be used.
.IP "-Y/--speed-limit <speed>"
If a download is slower than this given speed, in bytes per second, for
speed-time seconds it gets aborted. speed-time is set with -Y and is 30 if
not set.
Daniel Stenberg's avatar
Daniel Stenberg committed
If this option is used several times, the last one will be used.
.IP "-z/--time-cond <date expression>"
(HTTP) Request a file that has been modified later than the given time and
date, or one that has been modified before that time. The date expression can
be all sorts of date strings or if it doesn't match any internal ones, it
tries to get the time from a given file name instead! See the
\fIcurl_getdate(3)\fP man pages for date expression details.

Start the date expression with a dash (-) to make it request for a document
that is older than the given date/time, default is a document that is newer
than the specified date/time.
If this option is used several times, the last one will be used.
.IP "--max-redirs <num>"
Set maximum number of redirection-followings allowed. If \fI-L/--location\fP
is used, this option can be used to prevent curl from following redirections
\&"in absurdum". By default, the limit is set to 50 redirections. Set this
option to -1 to make it limitless.
Daniel Stenberg's avatar
Daniel Stenberg committed
If this option is used several times, the last one will be used.
Daniel Stenberg's avatar
Daniel Stenberg committed
.IP "-0/--http1.0"
(HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its
internally preferred: HTTP 1.1.
.IP "-1/--tlsv1"
(HTTPS)
Forces curl to use TSL version 1 when negotiating with a remote TLS server.
Daniel Stenberg's avatar
Daniel Stenberg committed
.IP "-2/--sslv2"
(HTTPS)
Forces curl to use SSL version 2 when negotiating with a remote SSL server.
.IP "-3/--sslv3"
(HTTPS)
Forces curl to use SSL version 3 when negotiating with a remote SSL server.
.IP "--3p-quote"
(FTP) Specify arbitrary commands to send to the source server. See the
\fI-Q/--quote\fP option for details. (Added in 7.13.0)
.IP "--3p-url"
(FTP) Activates a FTP 3rd party transfer. Specifies the source URL to get a
file from, while the "normal" URL will be used as target URL, the file that
will be written/created.

Note that not all FTP server allow 3rd party transfers. (Added in 7.13.0)
.IP "--3p-user"
(FTP) Specify user:password for the source URL transfer. (Added in 7.13.0)
Daniel Stenberg's avatar
Daniel Stenberg committed
.IP "-4/--ipv4"
If libcurl is capable of resolving an address to multiple IP versions (which
it is if it is ipv6-capable), this option tells libcurl to resolve names to
Daniel Stenberg's avatar
Daniel Stenberg committed
.IP "-6/--ipv6"
If libcurl is capable of resolving an address to multiple IP versions (which
it is if it is ipv6-capable), this option tells libcurl to resolve names to
.IP "-#/--progress-bar"
Make curl display progress information as a progress bar instead of the
default statistics.

If this option is used twice, the second will again disable the progress bar.
.SH FILES
.I ~/.curlrc
.RS
Default config file.

.SH ENVIRONMENT
.IP "http_proxy [protocol://]<host>[:port]"
Sets proxy server to use for HTTP.
.IP "HTTPS_PROXY [protocol://]<host>[:port]"
Sets proxy server to use for HTTPS.
.IP "FTP_PROXY [protocol://]<host>[:port]"
Sets proxy server to use for FTP.
.IP "ALL_PROXY [protocol://]<host>[:port]"
Sets proxy server to use if no protocol-specific proxy is set.
.IP "NO_PROXY <comma-separated list of hosts>"
list of host names that shouldn't go through any proxy. If set to a asterisk
\&'*' only, it matches all hosts.
.SH EXIT CODES
There exists a bunch of different error codes and their corresponding error
messages that may appear during bad conditions. At the time of this writing,
the exit codes are:
.IP 1
Unsupported protocol. This build of curl has no support for this protocol.
.IP 2
Failed to initialize.
.IP 3
URL malformat. The syntax was not correct.
.IP 4
URL user malformatted. The user-part of the URL syntax was not correct.
.IP 5
Couldn't resolve proxy. The given proxy host could not be resolved.
.IP 6
Couldn't resolve host. The given remote host was not resolved.
.IP 7
Failed to connect to host.
.IP 8
FTP weird server reply. The server sent data curl couldn't parse.
.IP 9
FTP access denied. The server denied login or denied access to the particular
resource or directory you wanted to reach. Most often you tried to change to a
directory that doesn't exist on the server.
.IP 10
FTP user/password incorrect. Either one or both were not accepted by the
server.
.IP 11
FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
.IP 12
FTP weird USER reply. Curl couldn't parse the reply sent to the USER request.
.IP 13
FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
.IP 14
Daniel Stenberg's avatar
Daniel Stenberg committed
FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
.IP 15
FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
.IP 16
FTP can't reconnect. Couldn't connect to the host we got in the 227-line.
.IP 17
FTP couldn't set binary. Couldn't change transfer method to binary.
.IP 18
Partial file. Only a part of the file was transferred.
Daniel Stenberg's avatar
Daniel Stenberg committed
FTP couldn't download/access the given file, the RETR (or similar) command
failed.
.IP 20
FTP write error. The transfer was reported bad by the server.
.IP 21
FTP quote error. A quote command returned error from the server.
.IP 22
HTTP page not retrieved. The requested url was not found or returned another
error with the HTTP error code being 400 or above. This return code only
.IP 23
Write error. Curl couldn't write data to a local filesystem or similar.
.IP 24
Malformed user. User name badly specified.
FTP couldn't STOR file. The server denied the STOR operation, used for FTP
uploading.
.IP 26
Read error. Various reading problems.
.IP 27
Out of memory. A memory allocation request failed.
.IP 28
Operation timeout. The specified time-out period was reached according to the
conditions.
.IP 29
FTP couldn't set ASCII. The server returned an unknown reply.
.IP 30
FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT
command, try doing a transfer using PASV instead!
FTP couldn't use REST. The REST command failed. This command is used for
resumed FTP transfers.
.IP 32
FTP couldn't use SIZE. The SIZE command failed. The command is an extension
to the original FTP spec RFC 959.
.IP 33
HTTP range error. The range "command" didn't work.
.IP 34
HTTP post error. Internal post-request generation error.
.IP 35
SSL connect error. The SSL handshaking failed.
.IP 36
FTP bad download resume. Couldn't continue an earlier aborted download.
.IP 37
FILE couldn't read file. Failed to open the file. Permissions?
.IP 38
LDAP cannot bind. LDAP bind operation failed.
.IP 39
LDAP search failed.
.IP 40
Library not found. The LDAP library was not found.
.IP 41
Function not found. A required LDAP function was not found.
Daniel Stenberg's avatar
Daniel Stenberg committed
.IP 42
Aborted by callback. An application told curl to abort the operation.
.IP 43
Internal error. A function was called with a bad parameter.
.IP 44
Internal error. A function was called in a bad order.
.IP 45
Interface error. A specified outgoing interface could not be used.
.IP 46
Bad password entered. An error was signaled when the password was entered.
Daniel Stenberg's avatar
Daniel Stenberg committed
.IP 47
Too many redirects. When following redirects, curl hit the maximum amount.
Daniel Stenberg's avatar
Daniel Stenberg committed
.IP 48
Unknown TELNET option specified.
.IP 49
Malformed telnet option.
.IP 51
The remote peer's SSL certificate wasn't ok
.IP 52
The server didn't reply anything, which here is considered an error.
.IP 53
SSL crypto engine not found
.IP 54
Cannot set SSL crypto engine as default
.IP 55
Failed sending network data
.IP 56
Failure in receiving network data
.IP 57
Share is in use (internal error)
.IP 58
Problem with the local certificate
.IP 59
Couldn't use specified SSL cipher
.IP 60
Problem with the CA cert (path? permission?)
.IP 61
Unrecognized transfer encoding
.IP 62
Invalid LDAP URL
.IP 63
Maximum file size exceeded
.IP 64
Requested FTP SSL level failed
.IP 65
Sending the data requires a rewind that failed
.IP 66
Failed to initialise SSL Engine
.IP 67
User, password or similar was not accepted and curl failed to login
.IP 68
File not found on TFTP server
.IP 69
Permission problem on TFTP server
.IP 70
Out of disk space on TFTP server
.IP 71
Illegal TFTP operation
.IP 72
Unknown TFTP transfer ID
.IP 73
File already exists (TFTP)
.IP 74
No such user (TFTP)
.IP 75
Character conversion failed
.IP 76
Character conversion functions required
.IP XX
There will appear more error codes here in future releases. The existing ones
are meant to never change.
.SH AUTHORS / CONTRIBUTORS
Daniel Stenberg is the main author, but the whole list of contributors is
found in the separate THANKS file.
Daniel Stenberg's avatar
Daniel Stenberg committed
http://curl.haxx.se
.SH FTP
ftp://ftp.sunet.se/pub/www/utilities/curl/
.SH "SEE ALSO"
.BR ftp (1),
Dan Fandrich's avatar
Dan Fandrich committed
.BR wget (1)