Skip to content
Snippets Groups Projects
curl.1 65.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • If this option is used multiple times, the last occurrence decide the amount.
    
    Daniel Stenberg's avatar
    Daniel Stenberg committed
    .IP "--retry-max-time <seconds>"
    The retry timer is reset before the first transfer attempt. Retries will be
    done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
    given limit. Notice that if the timer hasn't reached the limit, the request
    will be made and while performing, it may take longer than this given time
    period. To limit a single request\'s maximum time, use \fI-m/--max-time\fP.
    
    Set this option to zero to not timeout retries. (Added in 7.12.3)
    
    If this option is used multiple times, the last occurrence decide the amount.
    
    .IP "-s/--silent"
    Silent mode. Don't show progress meter or error messages.  Makes
    Curl mute.
    
    If this option is used twice, the second will again disable silent mode.
    
    .IP "-S/--show-error"
    When used with -s it makes curl show error message if it fails.
    
    
    If this option is used twice, the second will again disable show error.
    
    .IP "--socks4 <host[:port]>"
    Use the specified SOCKS4 proxy. If the port number is not specified, it is
    assumed at port 1080. (Added in 7.15.2)
    
    This option overrides any previous use of \fI-x/--proxy\fP, as they are
    mutually exclusive.
    
    If this option is used several times, the last one will be used.
    .IP "--socks5 <host[:port]>"
    
    Daniel Stenberg's avatar
    Daniel Stenberg committed
    Use the specified SOCKS5 proxy. If the port number is not specified, it is
    
    assumed at port 1080. (Added in 7.11.1)
    
    Daniel Stenberg's avatar
    Daniel Stenberg committed
    
    This option overrides any previous use of \fI-x/--proxy\fP, as they are
    mutually exclusive.
    
    
    If this option is used several times, the last one will be used. (This option
    was previously wrongly documented and used as --socks without the number
    appended.)
    
    .IP "--stderr <file>"
    Redirect all writes to stderr to the specified file instead. If the file name
    is a plain '-', it is instead written to stdout. This option has no point when
    you're using a shell with decent redirecting capabilities.
    
    If this option is used several times, the last one will be used.
    
    .IP "--tcp-nodelay"
    Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
    details about this option. (Added in 7.11.2)
    
    
    If this option is used several times, each occurrence toggles this on/off.
    
    .IP "-t/--telnet-option <OPT=val>"
    Pass options to the telnet protocol. Supported options are:
    
    TTYPE=<term> Sets the terminal type.
    
    XDISPLOC=<X display> Sets the X display location.
    
    NEW_ENV=<var,val> Sets an environment variable.
    
    .IP "-T/--upload-file <file>"
    
    This transfers the specified local file to the remote URL. If there is no file
    part in the specified URL, Curl will append the local file name. NOTE that you
    must use a trailing / on the last directory to really prove to Curl that there
    is no file name or curl will think that your last directory name is the remote
    file name to use. That will most likely cause the upload operation to fail. If
    
    this is used on a http(s) server, the PUT command will be used.
    
    Use the file name "-" (a single dash) to use stdin instead of a given file.
    
    
    You can specify one -T for each URL on the command line. Each -T + URL pair
    specifies what to upload and to where. curl also supports "globbing" of the -T
    argument, meaning that you can upload multiple files to a single URL by using
    the same URL globbing style supported in the URL, like this:
    
    
    curl -T "{file1,file2}" http://www.uploadtothissite.com
    
    or even
    
    curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
    
    .IP "--trace <file>"
    Enables a full trace dump of all incoming and outgoing data, including
    
    descriptive information, to the given output file. Use "-" as filename to have
    the output sent to stdout.
    
    
    This option overrides previous uses of \fI-v/--verbose\fP or
    \fI--trace-ascii\fP.
    
    
    If this option is used several times, the last one will be used.
    
    .IP "--trace-ascii <file>"
    Enables a full trace dump of all incoming and outgoing data, including
    descriptive information, to the given output file. Use "-" as filename to have
    the output sent to stdout.
    
    
    This is very similar to \fI--trace\fP, but leaves out the hex part and only
    shows the ASCII part of the dump. It makes smaller output that might be easier
    to read for untrained humans.
    
    This option overrides previous uses of \fI-v/--verbose\fP or \fI--trace\fP.
    
    
    If this option is used several times, the last one will be used.
    
    .IP "--trace-time"
    Prepends a time stamp to each trace or verbose line that curl displays.
    
    
    If this option is used several times, each occurrence will toggle it on/off.
    
    .IP "-u/--user <user:password>"
    
    Specify user and password to use for server authentication. Overrides
    \fI-n/--netrc\fP and \fI--netrc-optional\fP.
    
    If you use an SSPI-enabled curl binary and do NTLM authentication, you can
    
    force curl to pick up the user name and password from your environment by
    simply specifying a single colon with this option: "-u :".
    
    
    Daniel Stenberg's avatar
    Daniel Stenberg committed
    If this option is used several times, the last one will be used.
    
    .IP "-U/--proxy-user <user:password>"
    
    Specify user and password to use for proxy authentication.
    
    If you use an SSPI-enabled curl binary and do NTLM authentication, you can
    
    force curl to pick up the user name and password from your environment by
    simply specifying a single colon with this option: "-U :".
    
    
    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 "--url <URL>"
    
    Specify a URL to fetch. This option is mostly handy when you want to specify
    
    URL(s) in a config file.
    
    
    This option may be used any number of times. To control where this URL is
    
    written, use the \fI-o/--output\fP or the \fI-O/--remote-name\fP options.
    
    .IP "-v/--verbose"
    
    Makes the fetching more verbose/talkative. Mostly usable for debugging. Lines
    
    starting with '>' means "header data" sent by curl, '<' means "header data"
    received by curl that is hidden in normal cases and lines starting with '*'
    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.
    
    
    This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
    
    If this option is used twice, the second will do nothing extra.
    
    .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 and krb5 for ftp 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>"
    
    Dan Fandrich's avatar
    Dan Fandrich committed
    (HTTP/FTP) 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"
    
    Forces curl to use TSL version 1 when negotiating with a remote TLS server.
    
    Daniel Stenberg's avatar
    Daniel Stenberg committed
    .IP "-2/--sslv2"
    
    Daniel Stenberg's avatar
    Daniel Stenberg committed
    Forces curl to use SSL version 2 when negotiating with a remote SSL server.
    .IP "-3/--sslv3"
    
    Daniel Stenberg's avatar
    Daniel Stenberg committed
    Forces curl to use SSL version 3 when negotiating with a remote SSL server.
    .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, see \fI-K/--config\fP for details.
    
    .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 signalled 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)