page-header 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2018, 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.haxx.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 "16 Dec 2016" "Curl 7.52.0" "Curl Manual"
  26. .SH NAME
  27. curl \- transfer a URL
  28. .SH SYNOPSIS
  29. .B curl [options / URLs]
  30. .SH DESCRIPTION
  31. .B curl
  32. is a tool to transfer data from or to a server, using one of the supported
  33. protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
  34. LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET
  35. and TFTP). The command is designed to work without user 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, Metalink, and more. As you will see below, the number of features will
  39. make your head spin!
  40. curl is powered by libcurl for all transfer-related features. See
  41. \fIlibcurl(3)\fP for details.
  42. .SH URL
  43. The URL syntax is protocol-dependent. You'll 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 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 instead
  75. \fBvery\fP liberal 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. invokes.
  81. .SH "PROGRESS METER"
  82. curl normally displays a progress meter during operations, indicating the
  83. amount of transferred data, transfer speeds and estimated time left, etc. The
  84. progress meter displays number of bytes and the speeds are in bytes per
  85. second. The suffixes (k, M, G, T, P) are 1024 based. For example 1k is 1024
  86. bytes. 1M is 1048576 bytes.
  87. curl displays this data to the terminal by default, so if you invoke curl to
  88. do an operation and it is about to write data to the terminal, it
  89. \fIdisables\fP the progress meter as otherwise it would mess up the output
  90. mixing progress meter and response data.
  91. If you want a progress meter for HTTP POST or PUT requests, you need to
  92. redirect the response output to a file, using shell redirect (>), --output or
  93. similar.
  94. It is not the same case for FTP upload as that operation does not spit out
  95. any response data to the terminal.
  96. If you prefer a progress "bar" instead of the regular meter, --progress-bar is
  97. your friend. You can also disable the progress meter completely with the
  98. --silent option.
  99. .SH OPTIONS
  100. Options start with one or two dashes. Many of the options require an
  101. additional value next to them.
  102. The short "single-dash" form of the options, -d for example, may be used with
  103. or without a space between it and its value, although a space is a recommended
  104. separator. The long "double-dash" form, --data for example, requires a space
  105. between it and its value.
  106. Short version options that don't need any additional values can be used
  107. immediately next to each other, like for example you can specify all the
  108. options -O, -L and -v at once as -OLv.
  109. In general, all boolean options are enabled with --\fBoption\fP and yet again
  110. disabled with --\fBno-\fPoption. That is, you use the exact same option name
  111. but prefix it with "no-". However, in this list we mostly only list and show
  112. the --option version of them. (This concept with --no options was added in
  113. 7.19.0. Previously most options were toggled on/off on repeated use of the
  114. same command line option.)