Annotation of embedaddon/curl/docs/cmdline-opts/write-out.d, revision 1.1.1.1

1.1       misho       1: Long: write-out
                      2: Short: w
                      3: Arg: <format>
                      4: Help: Use output FORMAT after completion
                      5: ---
                      6: Make curl display information on stdout after a completed transfer. The format
                      7: is a string that may contain plain text mixed with any number of
                      8: variables. The format can be specified as a literal "string", or you can have
                      9: curl read the format from a file with "@filename" and to tell curl to read the
                     10: format from stdin you write "@-".
                     11: 
                     12: The variables present in the output format will be substituted by the value or
                     13: text that curl thinks fit, as described below. All variables are specified as
                     14: %{variable_name} and to output a normal % you just write them as %%. You can
                     15: output a newline by using \\n, a carriage return with \\r and a tab space with
                     16: \\t.
                     17: 
                     18: The output will be written to standard output, but this can be switched to
                     19: standard error by using %{stderr}.
                     20: 
                     21: .B NOTE:
                     22: The %-symbol is a special symbol in the win32-environment, where all
                     23: occurrences of % must be doubled when using this option.
                     24: 
                     25: The variables available are:
                     26: .RS
                     27: .TP 15
                     28: .B content_type
                     29: The Content-Type of the requested document, if there was any.
                     30: .TP
                     31: .B filename_effective
                     32: The ultimate filename that curl writes out to. This is only meaningful if curl
                     33: is told to write to a file with the --remote-name or --output
                     34: option. It's most useful in combination with the --remote-header-name
                     35: option. (Added in 7.26.0)
                     36: .TP
                     37: .B ftp_entry_path
                     38: The initial path curl ended up in when logging on to the remote FTP
                     39: server. (Added in 7.15.4)
                     40: .TP
                     41: .B http_code
                     42: The numerical response code that was found in the last retrieved HTTP(S) or
                     43: FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
                     44: same info.
                     45: .TP
                     46: .B http_connect
                     47: The numerical code that was found in the last response (from a proxy) to a
                     48: curl CONNECT request. (Added in 7.12.4)
                     49: .TP
                     50: .B http_version
                     51: The http version that was effectively used. (Added in 7.50.0)
                     52: .TP
                     53: .B json
                     54: A JSON object with all available keys.
                     55: .TP
                     56: .B local_ip
                     57: The IP address of the local end of the most recently done connection - can be
                     58: either IPv4 or IPv6 (Added in 7.29.0)
                     59: .TP
                     60: .B local_port
                     61: The local port number of the most recently done connection (Added in 7.29.0)
                     62: .TP
                     63: .B num_connects
                     64: Number of new connects made in the recent transfer. (Added in 7.12.3)
                     65: .TP
                     66: .B num_redirects
                     67: Number of redirects that were followed in the request. (Added in 7.12.3)
                     68: .TP
                     69: .B proxy_ssl_verify_result
                     70: The result of the HTTPS proxy's SSL peer certificate verification that was
                     71: requested. 0 means the verification was successful. (Added in 7.52.0)
                     72: .TP
                     73: .B redirect_url
                     74: When an HTTP request was made without --location to follow redirects (or when
                     75: --max-redir is met), this variable will show the actual URL a redirect
                     76: \fIwould\fP have gone to. (Added in 7.18.2)
                     77: .TP
                     78: .B remote_ip
                     79: The remote IP address of the most recently done connection - can be either
                     80: IPv4 or IPv6 (Added in 7.29.0)
                     81: .TP
                     82: .B remote_port
                     83: The remote port number of the most recently done connection (Added in 7.29.0)
                     84: .TP
                     85: .B scheme
                     86: The URL scheme (sometimes called protocol) that was effectively used (Added in 7.52.0)
                     87: .TP
                     88: .B size_download
                     89: The total amount of bytes that were downloaded.
                     90: .TP
                     91: .B size_header
                     92: The total amount of bytes of the downloaded headers.
                     93: .TP
                     94: .B size_request
                     95: The total amount of bytes that were sent in the HTTP request.
                     96: .TP
                     97: .B size_upload
                     98: The total amount of bytes that were uploaded.
                     99: .TP
                    100: .B speed_download
                    101: The average download speed that curl measured for the complete download. Bytes
                    102: per second.
                    103: .TP
                    104: .B speed_upload
                    105: The average upload speed that curl measured for the complete upload. Bytes per
                    106: second.
                    107: .TP
                    108: .B ssl_verify_result
                    109: The result of the SSL peer certificate verification that was requested. 0
                    110: means the verification was successful. (Added in 7.19.0)
                    111: .TP
                    112: .B stderr
                    113: From this point on, the --write-out output will be written to standard
                    114: error. (Added in 7.63.0)
                    115: .TP
                    116: .B stdout
                    117: From this point on, the --write-out output will be written to standard output.
                    118: This is the default, but can be used to switch back after switching to stderr.
                    119: (Added in 7.63.0)
                    120: .TP
                    121: .B time_appconnect
                    122: The time, in seconds, it took from the start until the SSL/SSH/etc
                    123: connect/handshake to the remote host was completed. (Added in 7.19.0)
                    124: .TP
                    125: .B time_connect
                    126: The time, in seconds, it took from the start until the TCP connect to the
                    127: remote host (or proxy) was completed.
                    128: .TP
                    129: .B time_namelookup
                    130: The time, in seconds, it took from the start until the name resolving was
                    131: completed.
                    132: .TP
                    133: .B time_pretransfer
                    134: The time, in seconds, it took from the start until the file transfer was just
                    135: about to begin. This includes all pre-transfer commands and negotiations that
                    136: are specific to the particular protocol(s) involved.
                    137: .TP
                    138: .B time_redirect
                    139: The time, in seconds, it took for all redirection steps including name lookup,
                    140: connect, pretransfer and transfer before the final transaction was
                    141: started. time_redirect shows the complete execution time for multiple
                    142: redirections. (Added in 7.12.3)
                    143: .TP
                    144: .B time_starttransfer
                    145: The time, in seconds, it took from the start until the first byte was just
                    146: about to be transferred. This includes time_pretransfer and also the time the
                    147: server needed to calculate the result.
                    148: .TP
                    149: .B time_total
                    150: The total time, in seconds, that the full operation lasted.
                    151: .TP
                    152: .B url_effective
                    153: The URL that was fetched last. This is most meaningful if you've told curl
                    154: to follow location: headers.
                    155: .RE
                    156: .IP
                    157: If this option is used several times, the last one will be used.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>