page-header 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" **************************************************************************
  22. .\"
  23. .\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
  24. .\"
  25. .TH curl 1 "%DATE" "curl %VERSION" "curl Manual"
  26. .SH NAME
  27. curl \- transfer a URL
  28. .SH SYNOPSIS
  29. .B curl [options / URLs]
  30. .SH DESCRIPTION
  31. **curl** is a tool for transferring data from or to a server. It supports these
  32. protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS,
  33. LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP,
  34. SMTPS, TELNET or TFTP. The command is designed to work without user
  35. interaction.
  36. curl offers a busload of useful tricks like proxy support, user
  37. authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
  38. resume and more. As you will see below, the number of features will make your
  39. head spin.
  40. curl is powered by libcurl for all transfer-related features. See
  41. *libcurl(3)* for details.
  42. .SH URL
  43. The URL syntax is protocol-dependent. You find a detailed description in
  44. RFC 3986.
  45. You can specify multiple URLs or parts of URLs by writing part sets within
  46. braces and quoting the URL as in:
  47. "http://site.{one,two,three}.com"
  48. or you can get sequences of alphanumeric series by using [] as in:
  49. "ftp://ftp.example.com/file[1-100].txt"
  50. "ftp://ftp.example.com/file[001-100].txt" (with leading zeros)
  51. "ftp://ftp.example.com/file[a-z].txt"
  52. Nested sequences are not supported, but you can use several ones next to each
  53. other:
  54. "http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html"
  55. You can specify any amount of URLs on the command line. They will be fetched
  56. in a sequential manner in the specified order. You can specify command line
  57. options and URLs mixed and in any order on the command line.
  58. You can specify a step counter for the ranges to get every Nth number or
  59. letter:
  60. "http://example.com/file[1-100:10].txt"
  61. "http://example.com/file[a-z:2].txt"
  62. When using [] or {} sequences when invoked from a command line prompt, you
  63. probably have to put the full URL within double quotes to avoid the shell from
  64. interfering with it. This also goes for other characters treated special, like
  65. for example '&', '?' and '*'.
  66. Provide the IPv6 zone index in the URL with an escaped percentage sign and the
  67. interface name. Like in
  68. "http://[fe80::3%25eth0]/"
  69. If you specify URL without protocol:// prefix, curl will attempt to guess what
  70. protocol you might want. It will then default to HTTP but try other protocols
  71. based on often-used host name prefixes. For example, for host names starting
  72. with "ftp." curl will assume you want to speak FTP.
  73. curl will do its best to use what you pass to it as a URL. It is not trying to
  74. validate it as a syntactically correct URL by any means but is fairly liberal
  75. with what it accepts.
  76. curl will attempt to re-use connections for multiple file transfers, so that
  77. getting many files from the same server will not do multiple connects /
  78. handshakes. This improves speed. Of course this is only done on files
  79. specified on a single command line and cannot be used between separate curl
  80. invocations.
  81. .SH OUTPUT
  82. If not told otherwise, curl writes the received data to stdout. It can be
  83. instructed to instead save that data into a local file, using the --output or
  84. --remote-name options. If curl is given multiple URLs to transfer on the
  85. command line, it similarly needs multiple options for where to save them.
  86. curl does not parse or otherwise "understand" the content it gets or writes as
  87. output. It does no encoding or decoding, unless explicitly asked to with
  88. dedicated command line options.
  89. .SH PROTOCOLS
  90. curl supports numerous protocols, or put in URL terms: schemes. Your
  91. particular build may not support them all.
  92. .IP DICT
  93. Lets you lookup words using online dictionaries.
  94. .IP FILE
  95. Read or write local files. curl does not support accessing file:// URL
  96. remotely, but when running on Microsoft Windows using the native UNC approach
  97. will work.
  98. .IP FTP(S)
  99. curl supports the File Transfer Protocol with a lot of tweaks and levers. With
  100. or without using TLS.
  101. .IP GOPHER(S)
  102. Retrieve files.
  103. .IP HTTP(S)
  104. curl supports HTTP with numerous options and variations. It can speak HTTP
  105. version 0.9, 1.0, 1.1, 2 and 3 depending on build options and the correct
  106. command line options.
  107. .IP IMAP(S)
  108. Using the mail reading protocol, curl can "download" emails for you. With or
  109. without using TLS.
  110. .IP LDAP(S)
  111. curl can do directory lookups for you, with or without TLS.
  112. .IP MQTT
  113. curl supports MQTT version 3. Downloading over MQTT equals "subscribe" to a
  114. topic while uploading/posting equals "publish" on a topic. MQTT over TLS is
  115. not supported (yet).
  116. .IP POP3(S)
  117. Downloading from a pop3 server means getting a mail. With or without using
  118. TLS.
  119. .IP RTMP(S)
  120. The Realtime Messaging Protocol is primarily used to server streaming media
  121. and curl can download it.
  122. .IP RTSP
  123. curl supports RTSP 1.0 downloads.
  124. .IP SCP
  125. curl supports SSH version 2 scp transfers.
  126. .IP SFTP
  127. curl supports SFTP (draft 5) done over SSH version 2.
  128. .IP SMB(S)
  129. curl supports SMB version 1 for upload and download.
  130. .IP SMTP(S)
  131. Uploading contents to an SMTP server means sending an email. With or without
  132. TLS.
  133. .IP TELNET
  134. Telling curl to fetch a telnet URL starts an interactive session where it
  135. sends what it reads on stdin and outputs what the server sends it.
  136. .IP TFTP
  137. curl can do TFTP downloads and uploads.
  138. .SH "PROGRESS METER"
  139. curl normally displays a progress meter during operations, indicating the
  140. amount of transferred data, transfer speeds and estimated time left, etc. The
  141. progress meter displays number of bytes and the speeds are in bytes per
  142. second. The suffixes (k, M, G, T, P) are 1024 based. For example 1k is 1024
  143. bytes. 1M is 1048576 bytes.
  144. curl displays this data to the terminal by default, so if you invoke curl to
  145. do an operation and it is about to write data to the terminal, it
  146. *disables* the progress meter as otherwise it would mess up the output
  147. mixing progress meter and response data.
  148. If you want a progress meter for HTTP POST or PUT requests, you need to
  149. redirect the response output to a file, using shell redirect (>), --output or
  150. similar.
  151. This does not apply to FTP upload as that operation does not spit out any
  152. response data to the terminal.
  153. If you prefer a progress "bar" instead of the regular meter, --progress-bar is
  154. your friend. You can also disable the progress meter completely with the
  155. --silent option.
  156. .SH OPTIONS
  157. Options start with one or two dashes. Many of the options require an
  158. additional value next to them.
  159. The short "single-dash" form of the options, -d for example, may be used with
  160. or without a space between it and its value, although a space is a recommended
  161. separator. The long "double-dash" form, --data for example, requires a space
  162. between it and its value.
  163. Short version options that do not need any additional values can be used
  164. immediately next to each other, like for example you can specify all the
  165. options -O, -L and -v at once as -OLv.
  166. In general, all boolean options are enabled with --**option** and yet again
  167. disabled with --**no-**option. That is, you use the same option name but
  168. prefix it with "no-". However, in this list we mostly only list and show the
  169. --option version of them.