write-out.d 4.8 KB

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