Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
/* NEVER EVER edit this manually, fix the mkhelp script instead! */
#include <stdio.h>
void hugehelp(void)
{
puts (
" _ _ ____ _ \n"
" Project ___| | | | _ \\| | \n"
" / __| | | | |_) | | \n"
" | (__| |_| | _ <| |___ \n"
" \\___|\\___/|_| \\_\\_____|\n"
"NAME\n"
" curl - get a URL with FTP, TELNET, LDAP, GOPHER, DICT, FILE,\n"
" HTTP or HTTPS syntax.\n"
"\n"
"SYNOPSIS\n"
" curl [options] url\n"
"\n"
"DESCRIPTION\n"
" curl is a client to get documents/files from servers, using\n"
" any of the supported protocols. The command is designed to\n"
" work without user interaction or any kind of interactivity.\n"
"\n"
" curl offers a busload of useful tricks like proxy support,\n"
" user authentication, ftp upload, HTTP post, SSL (https:)\n"
" connections, cookies, file transfer resume and more.\n"
"\n"
"URL\n"
" The URL syntax is protocol dependent. You'll find a detailed\n"
" description in RFC 2396.\n"
"\n"
" You can specify multiple URLs or parts of URLs by writing\n"
" part sets within braces as in:\n"
"\n"
" http://site.{one,two,three}.com\n"
"\n"
" or you can get sequences of alphanumeric series by using []\n"
" as in:\n"
"\n"
" ftp://ftp.numericals.com/file[1-100].txt\n"
" ftp://ftp.numericals.com/file[001-100].txt (with leading\n"
" zeros)\n"
" ftp://ftp.letters.com/file[a-z].txt\n"
"\n"
" It is possible to specify up to 9 sets or series for a URL,\n"
" but no nesting is supported at the moment:\n"
"\n"
" http://www.any.org/archive[1996-1999]/volume[1-\n"
" 4]part{a,b,c,index}.html\n"
"\n"
"OPTIONS\n"
" -a/--append\n"
" (FTP) When used in a ftp upload, this will tell curl to\n"
" append to the target file instead of overwriting it. If\n"
" the file doesn't exist, it will be created.\n"
"\n"
" -A/--user-agent <agent string>\n"
" (HTTP) Specify the User-Agent string to send to the\n"
" HTTP server. Some badly done CGIs fail if its not set\n"
" to \"Mozilla/4.0\". To encode blanks in the string, sur-\n"
" round the string with single quote marks. This can\n"
" also be set with the -H/--header flag of course.\n"
" -b/--cookie <name=data>\n"
" (HTTP) Pass the data to the HTTP server as a cookie. It\n"
" is supposedly the data previously received from the\n"
" server in a \"Set-Cookie:\" line. The data should be in\n"
" the format \"NAME1=VALUE1; NAME2=VALUE2\".\n"
"\n"
" If no '=' letter is used in the line, it is treated as\n"
" a filename to use to read previously stored cookie\n"
" lines from, which should be used in this session if\n"
" they match. Using this method also activates the\n"
" \"cookie parser\" which will make curl record incoming\n"
" cookies too, which may be handy if you're using this in\n"
" combination with the -L/--location option. The file\n"
" format of the file to read cookies from should be plain\n"
" HTTP headers or the netscape cookie file format.\n"
"\n"
" -B/--ftp-ascii\n"
" (FTP/LDAP) Use ASCII transfer when getting an FTP file\n"
" or LDAP info. For FTP, this can also be enforced by\n"
" using an URL that ends with \";type=A\".\n"
"\n"
" -c/--continue\n"
" Continue/Resume a previous file transfer. This\n"
" instructs curl to continue appending data on the file\n"
" where it was previously left, possibly because of a\n"
" broken connection to the server. There must be a named\n"
" physical file to append to for this to work. Note:\n"
" Upload resume is depening on a command named SIZE not\n"
" always present in all ftp servers! Upload resume is for\n"
" FTP only. HTTP resume is only possible with HTTP/1.1\n"
" or later servers.\n"
"\n"
" -C/--continue-at <offset>\n"
" Continue/Resume a previous file transfer at the given\n"
" offset. The given offset is the exact number of bytes\n"
" that will be skipped counted from the beginning of the\n"
" source file before it is transfered to the destination.\n"
" If used with uploads, the ftp server command SIZE will\n"
" not be used by curl. Upload resume is for FTP only.\n"
" HTTP resume is only possible with HTTP/1.1 or later\n"
" servers.\n"
"\n"
" -d/--data <data>\n"
" (HTTP) Sends the specified data in a POST request to\n"
" the HTTP server. Note that the data is sent exactly as\n"
" specified with no extra processing. The data is\n"
" expected to be \"url-encoded\". This will cause curl to\n"
" pass the data to the server using the content-type\n"
" application/x-www-form-urlencoded. Compare to -F.\n"
"\n"
" If you start the data with the letter @, the rest\n"
" should be a file name to read the data from, or - if\n"
" you want curl to read the data from stdin. The con-\n"
" tents of the file must already be url-encoded.\n"
"\n"
" -D/--dump-header <file>\n"
" (HTTP/FTP) Write the HTTP headers to this file. Write\n"
" the FTP file info to this file if -I/--head is used.\n"
"\n"
" -e/--referer <URL>\n"
" (HTTP) Sends the \"Referer Page\" information to the HTTP\n"
" server. Some badly done CGIs fail if it's not set. This\n"
" can also be set with the -H/--header flag of course.\n"
"\n"
" -E/--cert <certificate[:password]>\n"
" (HTTPS) Tells curl to use the specified certificate\n"
" file when getting a file with HTTPS. The certificate\n"
" must be in PEM format. If the optional password isn't\n"
" specified, it will be queried for on the terminal. Note\n"
" that this certificate is the private key and the\n"
" private certificate concatenated!\n"
"\n"
" -f/--fail\n"
" (HTTP) Fail silently (no output at all) on server\n"
" errors. This is mostly done like this to better enable\n"
" scripts etc to better deal with failed attempts. In\n"
" normal cases when a HTTP server fails to deliver a\n"
" document, it returns a HTML document stating so (which\n"
" often also describes why and more). This flag will\n"
" prevent curl from outputting that and fail silently\n"
" instead.\n"
"\n"
" -F/--form <name=content>\n"
" (HTTP) This lets curl emulate a filled in form in which\n"
" a user has pressed the submit button. This causes curl\n"
" to POST data using the content-type multipart/form-data\n"
" according to RFC1867. This enables uploading of binary\n"
" files etc. To force the 'content' part to be read from\n"
" a file, prefix the file name with an @ sign. Example,\n"
" to send your password file to the server, where 'pass-\n"
" word' is the name of the form-field to which\n"
" /etc/passwd will be the input:\n"
"\n"
" curl -F password=@/etc/passwd www.mypasswords.com\n"
"\n"
" To read the file's content from stdin insted of a file,\n"
" use - where the file name should've been.\n"
"\n"
" -h/--help\n"
" Usage help.\n"
"\n"
" -H/--header <header>\n"
" (HTTP) Extra header to use when getting a web page. You\n"
" may specify any number of extra headers. Note that if\n"
" you should add a custom header that has the same name\n"
" as one of the internal ones curl would use, your exter-\n"
" nally set header will be used instead of the internal\n"
" one. This allows you to make even trickier stuff than\n"
" curl would normally do. You should not replace inter-\n"
" nally set headers without knowing perfectly well what\n"
" you're doing.\n"
"\n"
" -i/--include\n"
" (HTTP) Include the HTTP-header in the output. The\n"
" HTTP-header includes things like server-name, date of\n"
" the document, HTTP-version and more...\n"
"\n"
" -I/--head\n"
" (HTTP/FTP) Fetch the HTTP-header only! HTTP-servers\n"
" feature the command HEAD which this uses to get nothing\n"
" but the header of a document. When used on a FTP file,\n"
" curl displays the file size only.\n"
"\n"
" -K/--config <config file>\n"
" Specify which config file to read curl arguments from.\n"
" The config file is a text file in which command line\n"
" arguments can be written which then will be used as if\n"
" they were written on the actual command line. If the\n"
" first column of a config line is a '#' character, the\n"
" rest of the line will be treated as a comment.\n"
"\n"
" Specify the filename as '-' to make curl read the file\n"
" from stdin.\n"
"\n"
" -l/--list-only\n"
" (FTP) When listing an FTP directory, this switch forces\n"
" a name-only view. Especially useful if you want to\n"
" machine-parse the contents of an FTP directory since\n"
" the normal directory view doesn't use a standard look\n"
Loading
Loading full blame…