Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
" 'Konqueror/1.0' KDE File Manager desktop client\n"
" 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser\n"
"\n"
"COOKIES\n"
"\n"
" Cookies are generally used by web servers to keep state information at the\n"
" client's side. The server sets cookies by sending a response line in the\n"
" headers that looks like 'Set-Cookie: <data>' where the data part then\n"
" typically contains a set of NAME=VALUE pairs (separated by semicolons ';'\n"
" like \"NAME1=VALUE1; NAME2=VALUE2;\"). The server can also specify for what\n"
" path the \"cookie\" should be used for (by specifying \"path=value\"), when the\n"
" cookie should expire (\"expire=DATE\"), for what domain to use it\n"
" (\"domain=NAME\") and if it should be used on secure connections only\n"
" (\"secure\").\n"
"\n"
" If you've received a page from a server that contains a header like:\n"
" Set-Cookie: sessionid=boo123; path=\"/foo\";\n"
"\n"
" it means the server wants that first pair passed on when we get anything in\n"
" a path beginning with \"/foo\".\n"
"\n"
" Example, get a page that wants my name passed in a cookie:\n"
"\n"
" curl -b \"name=Daniel\" www.sillypage.com\n"
"\n"
" Curl also has the ability to use previously received cookies in following\n"
" sessions. If you get cookies from a server and store them in a file in a\n"
" manner similar to:\n"
"\n"
" curl --dump-header headers www.example.com\n"
"\n"
" ... you can then in a second connect to that (or another) site, use the\n"
" cookies from the 'headers' file like:\n"
"\n"
" curl -b headers www.example.com\n"
"\n"
" Note that by specifying -b you enable the \"cookie awareness\" and with -L\n"
" you can make curl follow a location: (which often is used in combination\n"
" with cookies). So that if a site sends cookies and a location, you can\n"
" use a non-existing file to trig the cookie awareness like:\n"
"\n"
" curl -L -b empty-file www.example.com\n"
"\n"
" The file to read cookies from must be formatted using plain HTTP headers OR\n"
" as netscape's cookie file. Curl will determine what kind it is based on the\n"
" file contents.\n"
"\n"
"PROGRESS METER\n"
"\n"
" The progress meter exists to show a user that something actually is\n"
" happening. The different fields in the output have the following meaning:\n"
" % Total % Received % Xferd Average Speed Time Curr.\n"
" Dload Upload Total Current Left Speed\n"
" 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287\n"
" % - percentage completed of the whole transfer\n"
" Total - total size of the whole expected transfer\n"
" % - percentage completed of the download\n"
" Received - currently downloaded amount of bytes\n"
" % - percentage completed of the upload\n"
" Xferd - currently uploaded amount of bytes\n"
" Average Speed\n"
" Dload - the average transfer speed of the download\n"
" Average Speed\n"
" Upload - the average transfer speed of the upload\n"
" Time Total - expected time to complete the operation\n"
" Time Current - time passed since the invoke\n"
" Time Left - expected time left to completetion\n"
" Curr.Speed - the average transfer speed the last 5 seconds (the first\n"
" 5 seconds of a transfer is based on less time of course.)\n"
"\n"
" The -# option will display a totally different progress bar that doesn't\n"
" need much explanation!\n"
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
"\n"
"SPEED LIMIT\n"
"\n"
" Curl offers the user to set conditions regarding transfer speed that must\n"
" be met to let the transfer keep going. By using the switch -y and -Y you\n"
" can make curl abort transfers if the transfer speed doesn't exceed your\n"
" given lowest limit for a specified time.\n"
"\n"
" To let curl abandon downloading this page if its slower than 3000 bytes per\n"
" second for 1 minute, run:\n"
"\n"
" curl -y 3000 -Y 60 www.far-away-site.com\n"
"\n"
" This can very well be used in combination with the overall time limit, so\n"
" that the above operatioin must be completed in whole within 30 minutes:\n"
"\n"
" curl -m 1800 -y 3000 -Y 60 www.far-away-site.com\n"
"\n"
"CONFIG FILE\n"
"\n"
" Curl automatically tries to read the .curlrc file (or _curlrc file on win32\n"
" systems) from the user's home dir on startup. The config file should be\n"
" made up with normal command line switches. Comments can be used within the\n"
" file. If the first letter on a line is a '#'-letter the rest of the line\n"
" is treated as a comment.\n"
"\n"
" Example, set default time out and proxy in a config file:\n"
"\n"
" # We want a 30 minute timeout:\n"
" -m 1800\n"
" # ... and we use a proxy for all accesses:\n"
" -x proxy.our.domain.com:8080\n"
"\n"
" White spaces ARE significant at the end of lines, but all white spaces\n"
" leading up to the first characters of each line are ignored.\n"
"\n"
" Prevent curl from reading the default file by using -q as the first command\n"
" line parameter, like:\n"
"\n"
" curl -q www.thatsite.com\n"
"\n"
" Force curl to get and display a local help page in case it is invoked\n"
" without URL by making a config file similar to:\n"
"\n"
" # default url to get\n"
" http://help.with.curl.com/curlhelp.html\n"
"\n"
" You can specify another config file to be read by using the -K/--config\n"
" flag. If you set config file name to \"-\" it'll read the config from stdin,\n"
" which can be handy if you want to hide options from being visible in process\n"
" tables etc:\n"
"\n"
" echo \"-u user:passwd\" | curl -K - http://that.secret.site.com\n"
"\n"
"EXTRA HEADERS\n"
"\n"
" When using curl in your own very special programs, you may end up needing\n"
" to pass on your own custom headers when getting a web page. You can do\n"
" this by using the -H flag.\n"
"\n"
" Example, send the header \"X-you-and-me: yes\" to the server when getting a\n"
" page:\n"
"\n"
" curl -H \"X-you-and-me: yes\" www.love.com\n"
"\n"
" This can also be useful in case you want curl to send a different text in\n"
" a header than it normally does. The -H header you specify then replaces the\n"
" header curl would normally send.\n"
"\n"
"FTP and PATH NAMES\n"
"\n"
" Do note that when getting files with the ftp:// URL, the given path is\n"
" relative the directory you enter. To get the file 'README' from your home\n"
" directory at your ftp site, do:\n"
"\n"
" curl ftp://user:passwd@my.site.com/README\n"
"\n"
" But if you want the README file from the root directory of that very same\n"
" site, you need to specify the absolute file name:\n"
"\n"
" curl ftp://user:passwd@my.site.com//README\n"
"\n"
" (I.e with an extra slash in front of the file name.)\n"
"\n"
"FTP and firewalls\n"
"\n"
" The FTP protocol requires one of the involved parties to open a second\n"
" connction as soon as data is about to get transfered. There are two ways to\n"
" do this.\n"
"\n"
" The default way for curl is to issue the PASV command which causes the\n"
" server to open another port and await another connection performed by the\n"
" client. This is good if the client is behind a firewall that don't allow\n"
" incoming connections.\n"
"\n"
" curl ftp.download.com\n"
"\n"
" If the server for example, is behind a firewall that don't allow connections\n"
" on other ports than 21 (or if it just doesn't support the PASV command), the\n"
" other way to do it is to use the PORT command and instruct the server to\n"
" connect to the client on the given (as parameters to the PORT command) IP\n"
" number and port.\n"
"\n"
" The -P flag to curl allows for different options. Your machine may have\n"
" several IP-addresses and/or network interfaces and curl allows you to select\n"
" which of them to use. Default address can also be used:\n"
"\n"
" curl -P - ftp.download.com\n"
"\n"
" Download with PORT but use the IP address of our 'le0' interface:\n"
"\n"
" curl -P le0 ftp.download.com\n"
"\n"
" Download with PORT but use 192.168.0.10 as our IP address to use:\n"
"\n"
" curl -P 192.168.0.10 ftp.download.com\n"
"\n"
"HTTPS\n"
"\n"
" Secure HTTP requires SSL libraries to be installed and used when curl is\n"
" built. If that is done, curl is capable of retrieving and posting documents\n"
" using the HTTPS procotol.\n"
"\n"
" Example:\n"
"\n"
" curl https://www.secure-site.com\n"
"\n"
" Curl is also capable of using your personal certificates to get/post files\n"
" from sites that require valid certificates. The only drawback is that the\n"
" certificate needs to be in PEM-format. PEM is a standard and open format to\n"
" store certificates with, but it is not used by the most commonly used\n"
" browsers (Netscape and MSEI both use the so called PKCS#12 format). If you\n"
" want curl to use the certificates you use with your (favourite) browser, you\n"
" may need to download/compile a converter that can convert your browser's\n"
" formatted certificates to PEM formatted ones. This kind of converter is\n"
" included in recent versions of OpenSSL, and for older versions Dr Stephen\n"
" N. Henson has written a patch for SSLeay that adds this functionality. You\n"
" can get his patch (that requires an SSLeay installation) from his site at:\n"
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
" http://www.drh-consultancy.demon.co.uk/\n"
"\n"
" Example on how to automatically retrieve a document using a certificate with\n"
" a personal password:\n"
"\n"
" curl -E /path/to/cert.pem:password https://secure.site.com/\n"
"\n"
" If you neglect to specify the password on the command line, you will be\n"
" prompted for the correct password before any data can be received.\n"
"\n"
" Many older SSL-servers have problems with SSLv3 or TLS, that newer versions\n"
" of OpenSSL etc is using, therefore it is sometimes useful to specify what\n"
" SSL-version curl should use. Use -3 or -2 to specify that exact SSL version\n"
" to use:\n"
"\n"
" curl -2 https://secure.site.com/\n"
"\n"
" Otherwise, curl will first attempt to use v3 and then v2.\n"
"\n"
"RESUMING FILE TRANSFERS\n"
"\n"
" To continue a file transfer where it was previously aborted, curl supports\n"
" resume on http(s) downloads as well as ftp uploads and downloads.\n"
"\n"
" Continue downloading a document:\n"
"\n"
" curl -c -o file ftp://ftp.server.com/path/file\n"
"\n"
" Continue uploading a document(*1):\n"
"\n"
" curl -c -T file ftp://ftp.server.com/path/file\n"
"\n"
" Continue downloading a document from a web server(*2):\n"
"\n"
" curl -c -o file http://www.server.com/\n"
"\n"
" (*1) = This requires that the ftp server supports the non-standard command\n"
" SIZE. If it doesn't, curl will say so.\n"
"\n"
" (*2) = This requires that the wb server supports at least HTTP/1.1. If it\n"
" doesn't, curl will say so.\n"
"\n"
"TIME CONDITIONS\n"
"\n"
" HTTP allows a client to specify a time condition for the document it\n"
" requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to\n"
" specify them with the -z/--time-cond flag.\n"
"\n"
" For example, you can easily make a download that only gets performed if the\n"
" remote file is newer than a local copy. It would be made like:\n"
"\n"
" curl -z local.html http://remote.server.com/remote.html\n"
"\n"
" Or you can download a file only if the local file is newer than the remote\n"
" one. Do this by prepending the date string with a '-', as in:\n"
"\n"
" curl -z -local.html http://remote.server.com/remote.html\n"
"\n"
" You can specify a \"free text\" date as condition. Tell curl to only download\n"
" the file if it was updated since yesterday:\n"
"\n"
" curl -z yesterday http://remote.server.com/remote.html\n"
"\n"
" Curl will then accept a wide range of date formats. You always make the date\n"
" check the other way around by prepending it with a dash '-'.\n"
"\n"
"DICT\n"
"\n"
" For fun try\n"
"\n"
" curl dict://dict.org/m:curl\n"
" curl dict://dict.org/d:heisenbug:jargon\n"
" curl dict://dict.org/d:daniel:web1913\n"
"\n"
" Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define'\n"
" and 'lookup'. For example,\n"
"\n"
" curl dict://dict.org/find:curl\n"
"\n"
" Commands that break the URL description of the RFC (but not the DICT\n"
" protocol) are\n"
"\n"
" curl dict://dict.org/show:db\n"
" curl dict://dict.org/show:strat\n"
"\n"
" Authentication is still missing (but this is not required by the RFC)\n"
"\n"
"LDAP\n"
"\n"
" If you have installed the OpenLDAP library, curl can take advantage of it\n"
" and offer ldap:// support.\n"
"\n"
" LDAP is a complex thing and writing an LDAP query is not an easy task. I do\n"
" advice you to dig up the syntax description for that elsewhere, RFC 1959 if\n"
" no other place is better.\n"
"\n"
" To show you an example, this is now I can get all people from my local LDAP\n"
" server that has a certain sub-domain in their email address:\n"
"\n"
" curl -B \"ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se\"\n"
"\n"
" If I want the same info in HTML format, I can get it by not using the -B\n"
" (enforce ASCII) flag.\n"
"\n"
"ENVIRONMENT VARIABLES\n"
"\n"
" Curl reads and understands the following environment variables:\n"
"\n"
" HTTP_PROXY, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY\n"
"\n"
" They should be set for protocol-specific proxies. General proxy should be\n"
" set with\n"
" \n"
" ALL_PROXY\n"
"\n"
" A comma-separated list of host names that shouldn't go through any proxy is\n"
" set in (only an asterisk, '*' matches all hosts)\n"
"\n"
" NO_PROXY\n"
"\n"
" If a tail substring of the domain-path for a host matches one of these\n"
" strings, transactions with that node will not be proxied.\n"
"\n"
"\n"
" The usage of the -x/--proxy flag overrides the environment variables.\n"
"\n"
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
"NETRC\n"
"\n"
" Unix introduced the .netrc concept a long time ago. It is a way for a user\n"
" to specify name and password for commonly visited ftp sites in a file so\n"
" that you don't have to type them in each time you visit those sites. You\n"
" realize this is a big security risk if someone else gets hold of your\n"
" passwords, so therefor most unix programs won't read this file unless it is\n"
" only readable by yourself (curl doesn't care though).\n"
"\n"
" Curl supports .netrc files if told so (using the -n/--netrc option). This is\n"
" not restricted to only ftp, but curl can use it for all protocols where\n"
" authentication is used.\n"
"\n"
" A very simple .netrc file could look something like:\n"
"\n"
" machine curl.haxx.nu login iamdaniel password mysecret\n"
"\n"
"CUSTOM OUTPUT\n"
"\n"
" To better allow script programmers to get to know about the progress of\n"
" curl, the -w/--write-out option was introduced. Using this, you can specify\n"
" what information from the previous transfer you want to extract.\n"
"\n"
" To display the amount of bytes downloaded together with some text and an\n"
" ending newline:\n"
"\n"
" curl -w 'We downloaded %{size_download} bytes\\n' www.download.com\n"
"\n"
"MAILING LIST\n"
"\n"
" We have an open mailing list to discuss curl, its development and things\n"
" relevant to this.\n"
"\n"
" To subscribe, mail curl-request@contactor.se with \"subscribe <your email\n"
" address>\" in the body.\n"
"\n"
" To post to the list, mail curl@contactor.se.\n"
"\n"
" To unsubcribe, mail curl-request@contactor.se with \"unsubscribe <your\n"
" subscribed email address>\" in the body.\n"
"\n"
) ;
}