Penguin
Annotated edit history of curl(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 curl
2 !!!curl
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 URL
7 OPTIONS
8 FILES
9 ENVIRONMENT
10 EXIT CODES
11 BUGS
12 AUTHORS / CONTRIBUTORS
13 WWW
14 FTP
15 SEE ALSO
16 ----
17 !!NAME
18
19
20 curl - transfer a URL
21 !!SYNOPSIS
22
23
24 __curl [[options]__ ''[[URL...]''
25 !!DESCRIPTION
26
27
28 __curl__ is a client to get documents/files from or send
29 documents to a server, using any of the supported protocols
30 (HTTP, HTTPS, FTP, GOPHER, DICT, TELNET, LDAP or FILE). The
31 command is designed to work without user interaction or any
32 kind of interactivity.
33
34
35 curl offers a busload of useful tricks like proxy support,
36 user authentication, ftp upload, HTTP post, SSL (https:)
37 connections, cookies, file transfer resume and
38 more.
39 !!URL
40
41
42 The URL syntax is protocol dependent. You'll find a detailed
43 description in RFC 2396.
44
45
46 You can specify multiple URLs or parts of URLs by writing
47 part sets within braces as in:
48
49
50 http://site.{one,two,three}.com
51
52
53 or you can get sequences of alphanumeric series by using [[]
54 as in:
55
56
57 ftp://ftp.numericals.com/file[[1-100].txt
58 ftp://ftp.numericals.com/file[[001-100].txt (with leading
59 zeros) ftp://ftp.letters.com/file[[a-z].txt
60
61
62 It is possible to specify up to 9 sets or series for a URL,
63 but no nesting is supported at the moment:
64
65
66 http://www.any.org/archive[[1996-1999]/volume[[1-4]part{a,b,c,index}.html
67
68
69 You can specify any amount of URLs on the command line. They
70 will be fetched in a sequential manner in the specified
71 order.
72
73
74 Curl will attempt to re-use connections for multiple file
75 transfers, so that getting many files from the same server
76 will not do multiple connects / handshakes. This improves
77 speed. Of course this is only done on files specified on a
78 single command line and cannot be used between separate curl
79 invokes.
80 !!OPTIONS
81
82
83 -a/--append
84
85
86 (FTP) When used in a ftp upload, this will tell curl to
87 append to the target file instead of overwriting it. If the
88 file doesn't exist, it will be created.
89
90
91 If this option is used twice, the second one will disable
92 append mode again.
93
94
95 -A/--user-agent
96
97
98 (HTTP) Specify the User-Agent string to send to the HTTP
99 server. Some badly done CGIs fail if its not set to
100
101
102 If this option is set more than once, the last one will be
103 the one that's used.
104
105
106 -b/--cookie
107
108
109 (HTTP) Pass the data to the HTTP server as a cookie. It is
110 supposedly the data previously received from the server in a
111
112
113 If no '=' letter is used in the line, it is treated as a
114 filename to use to read previously stored cookie lines from,
115 which should be used in this session if they match. Using
116 this method also activates the
117
118
119 __NOTE__ that the file specified with -b/--cookie is only
120 used as input. No cookies will be stored in the file. To
121 store cookies, save the HTTP headers to a file using
122 -D/--dump-header!
123
124
125 If this option is set more than once, the last one will be
126 the one that's used.
127
128
129 -B/--use-ascii
130
131
132 Use ASCII transfer when getting an FTP file or LDAP info.
133 For FTP, this can also be enforced by using an URL that ends
134 with
135
136
137 If this option is used twice, the second one will disable
138 ASCII usage.
139
140
141 --ciphers
142
143
144 (SSL) Specifies which ciphers to use in the connection. The
145 list of ciphers must be using valid ciphers. Read up on SSL
146 cipher list details on this URL:
147 ''http://www.openssl.org/docs/apps/ciphers.html (Option
148 added in curl 7.9)''
149
150
151 If this option is used severl times, the last one will
152 override the others.
153
154
155 --connect-timeout
156
157
158 Maximum time in seconds that you allow the connection to the
159 server to take. This only limits the connection phase, once
160 curl has connected this option is of no more use. This
161 option didn't work in win32 systems until 7.7.2. See also
162 the ''--max-time'' option.
163
164
165 If this option is used several times, the last one will be
166 used.
167
168
169 -c/--cookie-jar
170
171
172 Specify to which file you want curl to write all cookies
173 after a completed operation. Curl writes all cookies
174 previously read from a specified file as well as all cookies
175 received from remote server(s). If no cookies are known, no
176 file will be written. The file will be written using the
177 Netscape cookie file format. If you set the file name to a
178 single dash,
179
180
181 If this option is used several times, the last specfied file
182 name will be used.
183
184
185 -C/--continue-at
186
187
188 Continue/Resume a previous file transfer at the given
189 offset. The given offset is the exact number of bytes that
190 will be skipped counted from the beginning of the source
191 file before it is transfered to the destination. If used
192 with uploads, the ftp server command SIZE will not be used
193 by curl.
194
195
196 Use
197
198
199 If this option is used several times, the last one will be
200 used.
201
202
203 -d/--data
204
205
206 (HTTP) Sends the specified data in a POST request to the
207 HTTP server, in a way that can emulate as if a user has
208 filled in a HTML form and pressed the submit button. Note
209 that the data is sent exactly as specified with no extra
210 processing (with all newlines cut off). The data is expected
211 to be
212
213
214 If you start the data with the letter @, the rest should be
215 a file name to read the data from, or - if you want curl to
216 read the data from stdin. The contents of the file must
217 already be url-encoded. Multiple files can also be
218 specified. Posting data from a file named 'foobar' would
219 thus be done with
220
221
222 To post data purely binary, you should instead use the
223 --data-binary option.
224
225
226 -d/--data is the same as --data-ascii.
227
228
229 If this option is used several times, the ones following the
230 first will append data.
231
232
233 --data-ascii
234
235
236 (HTTP) This is an alias for the -d/--data
237 option.
238
239
240 If this option is used several times, the ones following the
241 first will append data.
242
243
244 --data-binary
245
246
247 (HTTP) This posts data in a similar manner as --data-ascii
248 does, although when using this option the entire context of
249 the posted data is kept as-is. If you want to post a binary
250 file without the strip-newlines feature of the --data-ascii
251 option, this is for you.
252
253
254 If this option is used several times, the ones following the
255 first will append data.
256
257
258 --disable-epsv
259
260
261 (FTP) Tell curl to disable the use of the EPSV command when
262 doing passive FTP downloads. Curl will normally always first
263 attempt to use EPSV before PASV, but with this option, it
264 will not try using EPSV.
265
266
267 IF this option is used several times, each occurrence will
268 toggle this on/off.
269
270
271 -D/--dump-header
272
273
274 (HTTP/FTP) Write the HTTP headers to this file. Write the
275 FTP file info to this file if -I/--head is
276 used.
277
278
279 This option is handy to use when you want to store the
280 cookies that a HTTP site sends to you. The cookies could
281 then be read in a second curl invoke by using the
282 -b/--cookie option!
283
284
285 If this option is used several times, the last one will be
286 used.
287
288
289 -e/--referer
290
291
292 (HTTP) Sends the
293 -L/--location'' you can
294 append
295 ''
296
297
298 If this option is used several times, the last one will be
299 used.
300
301
302 --egd-file
303
304
305 (HTTPS) Specify the path name to the Entropy Gathering
306 Daemon socket. The socket is used to seed the random engine
307 for SSL connections. See also the ''--random-file''
308 option.
309
310
311 -E/--cert
312
313
314 (HTTPS) Tells curl to use the specified certificate file
315 when getting a file with HTTPS. The certificate must be in
316 PEM format. If the optional password isn't specified, it
317 will be queried for on the terminal. Note that this
318 certificate is the private key and the private certificate
319 concatenated!
320
321
322 If this option is used several times, the last one will be
323 used.
324
325
326 --cacert
327
328
329 (HTTPS) Tells curl to use the specified certificate file to
330 verify the peer. The certificate must be in PEM
331 format.
332
333
334 If this option is used several times, the last one will be
335 used.
336
337
338 -f/--fail
339
340
341 (HTTP) Fail silently (no output at all) on server errors.
342 This is mostly done like this to better enable scripts etc
343 to better deal with failed attempts. In normal cases when a
344 HTTP server fails to deliver a document, it returns a HTML
345 document stating so (which often also describes why and
346 more). This flag will prevent curl from outputting that and
347 fail silently instead.
348
349
350 If this option is used twice, the second will again disable
351 silent failure.
352
353
354 -F/--form
355
356
357 (HTTP) This lets curl emulate a filled in form in which a
358 user has pressed the submit button. This causes curl to POST
359 data using the content-type multipart/form-data according to
360 RFC1867. This enables uploading of binary files etc. To
361 force the 'content' part to be be a file, prefix the file
362 name with an @ sign. To just get the content part from a
363 file, prefix the file name with the letter
364
365
366 Example, to send your password file to the server, where
367 'password' is the name of the form-field to which
368 /etc/passwd will be the input:
369
370
371 __curl__ -F password=@/etc/passwd
372 www.mypasswords.com
373
374
375 To read the file's content from stdin insted of a file, use
376 - where the file name should've been. This goes for both @
377 and
378
379
380 This option can be used multiple times.
381
382
383 -g/--globoff
384
385
386 This option switches off the
387
388
389 -G/--get
390
391
392 When used, this option will make all data specified with
393 -d/--data or --data-binary to be used in a HTTP GET request
394 instead of the POST request that otherwise would be used.
395 The data will be appended to the URL with a '?' separator.
396 (Option added in curl 7.9)
397
398
399 -h/--help
400
401
402 Usage help.
403
404
405 -H/--header
406
407
408 (HTTP) Extra header to use when getting a web page. You may
409 specify any number of extra headers. Note that if you should
410 add a custom header that has the same name as one of the
411 internal ones curl would use, your externally set header
412 will be used instead of the internal one. This allows you to
413 make even trickier stuff than curl would normally do. You
414 should not replace internally set headers without knowing
415 perfectly well what you're doing. Replacing an internal
416 header with one without content on the right side of the
417 colon will prevent that header from appearing.
418
419
420 This option can be used multiple times.
421
422
423 -i/--include
424
425
426 (HTTP) Include the HTTP-header in the output. The
427 HTTP-header includes things like server-name, date of the
428 document, HTTP-version and more...
429
430
431 If this option is used twice, the second will again disable
432 header include.
433
434
435 --interface
436
437
438 Perform an operation using a specified interface. You can
439 enter interface name, IP address or host name. An example
440 could look like:
441
442
443 __curl --interface eth0:1
444 http://www.netscape.com/__
445
446
447 If this option is used several times, the last one will be
448 used.
449
450
451 -I/--head
452
453
454 (HTTP/FTP) Fetch the HTTP-header only! HTTP-servers feature
455 the command HEAD which this uses to get nothing but the
456 header of a document. When used on a FTP file, curl displays
457 the file size only.
458
459
460 If this option is used twice, the second will again disable
461 header only.
462
463
464 --krb4
465
466
467 (FTP) Enable kerberos4 authentication and use. The level
468 must be entered and should be one of 'clear', 'safe',
469 'confidential' or 'private'. Should you use a level that is
470 not one of these, 'private' will instead be
471 used.
472
473
474 If this option is used several times, the last one will be
475 used.
476
477
478 -K/--config
479
480
481 Specify which config file to read curl arguments from. The
482 config file is a text file in which command line arguments
483 can be written which then will be used as if they were
484 written on the actual command line. Options and their
485 parameters must be specified on the same config file line.
486 If the parameter is to contain white spaces, the parameter
487 must be inclosed within quotes. If the first column of a
488 config line is a '#' character, the rest of the line will be
489 treated as a comment.
490
491
492 Specify the filename as '-' to make curl read the file from
493 stdin.
494
495
496 This option can be used multiple times.
497
498
499 -l/--list-only
500
501
502 (FTP) When listing an FTP directory, this switch forces a
503 name-only view. Especially useful if you want to
504 machine-parse the contents of an FTP directory since the
505 normal directory view doesn't use a standard look or
506 format.
507
508
509 If this option is used twice, the second will again disable
510 list only.
511
512
513 -L/--location
514
515
516 (HTTP/HTTPS) If the server reports that the requested page
517 has a different location (indicated with the header line
518 Location:) this flag will let curl attempt to reattempt the
519 get on the new place. If used together with -i or -I,
520 headers from all requested pages will be shown. If this flag
521 is used when making a HTTP POST, curl will automatically
522 switch to GET after the initial POST has been
523 done.
524
525
526 If this option is used twice, the second will again disable
527 location following.
528
529
530 -m/--max-time
531
532
533 Maximum time in seconds that you allow the whole operation
534 to take. This is useful for preventing your batch jobs from
535 hanging for hours due to slow networks or links going down.
536 This doesn't work fully in win32 systems. See also the
537 ''--connect-timeout'' option.
538
539
540 If this option is used several times, the last one will be
541 used.
542
543
544 -M/--manual
545
546
547 Manual. Display the huge help text.
548
549
550 -n/--netrc
551
552
553 Makes curl scan the ''.netrc'' file in the user's home
554 directory for login name and password. This is typically
555 used for ftp on unix. If used with http, curl will enable
556 user authentication. See __netrc(4)__ or __ftp(1)__
557 for details on the file format. Curl will not complain if
558 that file hasn't the right permissions (it should not be
559 world nor group readable). The environment variable
560 __
561
562
563 A quick and very simple example of how to setup a
564 ''.netrc'' to allow curl to ftp to the machine
565 host.domain.com with user name 'myself' and password
566 'secret' should look similar to:
567
568
569 __machine host.domain.com login myself password
570 secret__
571
572
573 If this option is used twice, the second will again disable
574 netrc usage.
575
576
577 -N/--no-buffer
578
579
580 Disables the buffering of the output stream. In normal work
581 situations, curl will use a standard buffered output stream
582 that will have the effect that it will output the data in
583 chunks, not necessarily exactly when the data arrives. Using
584 this option will disable that buffering.
585
586
587 If this option is used twice, the second will again switch
588 on buffering.
589
590
591 -o/--output
592
593
594 Write output to
595
596
597 curl http://{one,two}.site.com -o
598
599
600 or use several variables like:
601
602
603 curl http://{site,host}.host[[1-5].com -o
604
605
606 You may use this option as many times as you have number of
607 URLs.
608
609
610 -O/--remote-name
611
612
613 Write output to a local file named like the remote file we
614 get. (Only the file part of the remote file is used, the
615 path is cut off.)
616
617
618 You may use this option as many times as you have number of
619 URLs.
620
621
622 -p/--proxytunnel
623
624
625 When an HTTP proxy is used, this option will cause non-HTTP
626 protocols to attempt to tunnel through the proxy instead of
627 merely using it to do HTTP-like operations. The tunnel
628 approach is made with the HTTP proxy CONNECT request and
629 requires that the proxy allows direct connect to the remote
630 port number curl wants to tunnel through to.
631
632
633 If this option is used twice, the second will again disable
634 proxy tunnel.
635
636
637 -P/--ftpport
638
639
640 (FTP) Reverses the initiator/listener roles when connecting
641 with ftp. This switch makes Curl use the PORT command
642 instead of PASV. In practice, PORT tells the server to
643 connect to the client's specified address and port, while
644 PASV asks the server for an ip address and port to connect
645 to.
646
647
648 __interface__
649
650
651 i.e
652
653
654 __IP address__
655
656
657 i.e
658
659
660 __host name__
661
662
663 i.e
664
665
666 __-__
667
668
669 (any single-letter string) to make it pick the machine's
670 default
671
672
673 If this option is used several times, the last one will be
674 used.
675
676
677 -q
678
679
680 If used as the first parameter on the command line, the
681 ''$HOME/.curlrc'' file will not be read and used as a
682 config file.
683
684
685 -Q/--quote
686
687
688 (FTP) Send an arbitrary command to the remote FTP server, by
689 using the QUOTE command of the server. Not all servers
690 support this command, and the set of QUOTE commands are
691 server specific! Quote commands are sent BEFORE the transfer
692 is taking place. To make commands take place after a
693 successful transfer, prefix them with a dash '-'. You may
694 specify any amount of commands to be run before and after
695 the transfer. If the server returns failure for one of the
696 commands, the entire operation will be aborted.
697
698
699 This option can be used multiple times.
700
701
702 --random-file
703
704
705 (HTTPS) Specify the path name to file containing what will
706 be considered as random data. The data is used to seed the
707 random engine for SSL connections. See also the
708 ''--edg-file'' option.
709
710
711 -r/--range
712
713
714 (HTTP/FTP) Retrieve a byte range (i.e a partial document)
715 from a HTTP/1.1 or FTP server. Ranges can be specified in a
716 number of ways.
717
718
719 __0-499__
720
721
722 specifies the first 500 bytes
723
724
725 __500-999__
726
727
728 specifies the second 500 bytes
729
730
731 __-500__
732
733
734 specifies the last 500 bytes
735
736
737 __9500__
738
739
740 specifies the bytes from offset 9500 and
741 forward
742
743
744 __0-0,-1__
745
746
747 specifies the first and last byte only(*)(H)
748
749
750 __500-700,600-799__
751
752
753 specifies 300 bytes from offset 500(H)
754
755
756 __100-199,500-599__
757
758
759 specifies two separate 100 bytes ranges(*)(H)
760
761
762 (*) = NOTE that this will cause the server to reply with a
763 multipart response!
764
765
766 You should also be aware that many HTTP/1.1 servers do not
767 have this feature enabled, so that when you attempt to get a
768 range, you'll instead get the whole document.
769
770
771 FTP range downloads only support the simple syntax
772 'start-stop' (optionally with one of the numbers omitted).
773 It depends on the non-RFC command SIZE.
774
775
776 If this option is used several times, the last one will be
777 used.
778
779
780 -R/--remote-time
781
782
783 When used, this will make libcurl attempt to figure out the
784 timestamp of the remote file, and if that is available make
785 the local file get that same timestamp.
786
787
788 If this option is used twice, the second time disables this
789 again.
790
791
792 -s/--silent
793
794
795 Silent mode. Don't show progress meter or error messages.
796 Makes Curl mute.
797
798
799 If this option is used twice, the second will again disable
800 mute.
801
802
803 -S/--show-error
804
805
806 When used with -s it makes curl show error message if it
807 fails.
808
809
810 If this option is used twice, the second will again disable
811 show error.
812
813
814 -t/--telnet-option
815
816
817 Pass options to the telnet protocol. Supported options
818 are:
819
820
821 TTYPE=
822
823
824 XDISPLOC=
825
826
827 NEW_ENV=
828
829
830 -T/--upload-file
831
832
833 This transfers the specified local file to the remote URL.
834 If there is no file part in the specified URL, Curl will
835 append the local file name. NOTE that you must use a
836 trailing / on the last directory to really prove to Curl
837 that there is no file name or curl will think that your last
838 directory name is the remote file name to use. That will
839 most likely cause the upload operation to fail. If this is
840 used on a http(s) server, the PUT command will be
841 used.
842
843
844 Use the file name
845
846
847 If this option is used several times, the last one will be
848 used.
849
850
851 -u/--user
852
853
854 Specify user and password to use when fetching. See
855 README.curl for detailed examples of how to use this. If no
856 password is specified, curl will ask for it
857 interactively.
858
859
860 If this option is used several times, the last one will be
861 used.
862
863
864 -U/--proxy-user
865
866
867 Specify user and password to use for Proxy authentication.
868 If no password is specified, curl will ask for it
869 interactively.
870
871
872 If this option is used several times, the last one will be
873 used.
874
875
876 --url
877
878
879 Specify a URL to fetch. This option is mostly handy when you
880 want to specify URL(s) in a config file.
881
882
883 This option may be used any number of times. To control
884 where this URL is written, use the ''-o'' or the
885 ''-O'' options.
886
887
888 -v/--verbose
889
890
891 Makes the fetching more verbose/talkative. Mostly usable for
892 debugging. Lines starting with '
893
894
895 If this option is used twice, the second will again disable
896 verbose.
897
898
899 -V/--version
900
901
902 Displays the full version of curl, libcurl and other 3rd
903 party libraries linked with the executable.
904
905
906 -w/--write-out
907
908
909 Defines what to display after a completed and successful
910 operation. The format is a string that may contain plain
911 text mixed with any number of variables. The string can be
912 specified as
913
914
915 The variables present in the output format will be
916 substituted by the value or text that curl thinks fit, as
917 described below. All variables are specified like
918 %{variable_name} and to output a normal % you just write
919 them like %%. You can output a newline by using n, a
920 carriage return with r and a tab space with t.
921
922
923 __NOTE:__ The %-letter is a special letter in the
924 win32-environment, where all occurrences of % must be
925 doubled when using this option.
926
927
928 Available variables are at this point:
929
930
931 __url_effective__
932
933
934 The URL that was fetched last. This is mostly meaningful if
935 you've told curl to follow location: headers.
936
937
938 __http_code__
939
940
941 The numerical code that was found in the last retrieved
942 HTTP(S) page.
943
944
945 __time_total__
946
947
948 The total time, in seconds, that the full operation lasted.
949 The time will be displayed with millisecond
950 resolution.
951
952
953 __time_namelookup__
954
955
956 The time, in seconds, it took from the start until the name
957 resolving was completed.
958
959
960 __time_connect__
961
962
963 The time, in seconds, it took from the start until the
964 connect to the remote host (or proxy) was
965 completed.
966
967
968 __time_pretransfer__
969
970
971 The time, in seconds, it took from the start until the file
972 transfer is just about to begin. This includes all
973 pre-transfer commands and negotiations that are specific to
974 the particular protocol(s) involved.
975
976
977 __time_starttransfer__
978
979
980 The time, in seconds, it took from the start until the first
981 byte is just about to be transfered. This includes
982 time_pretransfer and also the time the server needs to
983 calculate the result.
984
985
986 __size_download__
987
988
989 The total amount of bytes that were downloaded.
990
991
992 __size_upload__
993
994
995 The total amount of bytes that were uploaded.
996
997
998 __size_header__
999
1000
1001 The total amount of bytes of the downloaded
1002 headers.
1003
1004
1005 __size_request__
1006
1007
1008 The total amount of bytes that were sent in the HTTP
1009 request.
1010
1011
1012 __speed_download__
1013
1014
1015 The average download speed that curl measured for the
1016 complete download.
1017
1018
1019 __speed_upload__
1020
1021
1022 The average upload speed that curl measured for the complete
1023 upload.
1024
1025
1026 __content_type__
1027
1028
1029 The Content-Type of the requested document, if there was
1030 any. (Added in 7.9.5)
1031
1032
1033 If this option is used several times, the last one will be
1034 used.
1035
1036
1037 -x/--proxy
1038
1039
1040 Use specified HTTP proxy. If the port number is not
1041 specified, it is assumed at port 1080.
1042
1043
1044 __Note__ that all operations that are performed over a
1045 HTTP proxy will transparantly be converted to HTTP. It means
1046 that certain protocol specific operations might not be
1047 available. This is not the case if you can tunnel through
1048 the proxy, as done with the ''-p/--proxytunnel''
1049 option.
1050
1051
1052 If this option is used several times, the last one will be
1053 used.
1054
1055
1056 -X/--request
1057
1058
1059 (HTTP) Specifies a custom request to use when communicating
1060 with the HTTP server. The specified request will be used
1061 instead of the standard GET. Read the HTTP 1.1 specification
1062 for details and explanations.
1063
1064
1065 (FTP) Specifies a custom FTP command to use instead of LIST
1066 when doing file lists with ftp.
1067
1068
1069 If this option is used several times, the last one will be
1070 used.
1071
1072
1073 -y/--speed-time
1074
1075
1076 If a download is slower than speed-limit bytes per second
1077 during a speed-time period, the download gets aborted. If
1078 speed-time is used, the default speed-limit will be 1 unless
1079 set with -y.
1080
1081
1082 If this option is used several times, the last one will be
1083 used.
1084
1085
1086 -Y/--speed-limit
1087
1088
1089 If a download is slower than this given speed, in bytes per
1090 second, for speed-time seconds it gets aborted. speed-time
1091 is set with -Y and is 30 if not set.
1092
1093
1094 If this option is used several times, the last one will be
1095 used.
1096
1097
1098 -z/--time-cond
1099
1100
1101 (HTTP) Request to get a file that has been modified later
1102 than the given time and date, or one that has been modified
1103 before that time. The date expression can be all sorts of
1104 date strings or if it doesn't match any internal ones, it
1105 tries to get the time from a given file name instead! See
1106 the __GNU date(1)__ or __curl_getdate(3)__ man pages
1107 for date expression details.
1108
1109
1110 Start the date expression with a dash (-) to make it request
1111 for a document that is older than the given date/time,
1112 default is a document that is newer than the specified
1113 date/time.
1114
1115
1116 If this option is used several times, the last one will be
1117 used.
1118
1119
1120 -3/--sslv3
1121
1122
1123 (HTTPS) Forces curl to use SSL version 3 when negotiating
1124 with a remote SSL server.
1125
1126
1127 -2/--sslv2
1128
1129
1130 (HTTPS) Forces curl to use SSL version 2 when negotiating
1131 with a remote SSL server.
1132
1133
1134 -0/--http1.0
1135
1136
1137 (HTTP) Forces curl to issue its requests using HTTP 1.0
1138 instead of using its internally preferred: HTTP
1139 1.1.
1140
1141
1142 -#/--progress-bar
1143
1144
1145 Make curl display progress information as a progress bar
1146 instead of the default statistics.
1147
1148
1149 If this option is used twice, the second will again disable
1150 the progress bar.
1151
1152
1153 --crlf
1154
1155
1156 (FTP) Convert LF to CRLF in upload. Useful for MVS
1157 (OS/390).
1158
1159
1160 If this option is used twice, the second will again disable
1161 crlf converting.
1162
1163
1164 --stderr
1165
1166
1167 Redirect all writes to stderr to the specified file instead.
1168 If the file name is a plain '-', it is instead written to
1169 stdout. This option has no point when you're using a shell
1170 with decent redirecting capabilities.
1171
1172
1173 If this option is used several times, the last one will be
1174 used.
1175 !!FILES
1176
1177
1178 ''~/.curlrc''
1179
1180
1181 Default config file.
1182 !!ENVIRONMENT
1183
1184
1185 http_proxy [[protocol://]
1186
1187
1188 Sets proxy server to use for HTTP.
1189
1190
1191 HTTPS_PROXY [[protocol://]
1192
1193
1194 Sets proxy server to use for HTTPS.
1195
1196
1197 FTP_PROXY [[protocol://]
1198
1199
1200 Sets proxy server to use for FTP.
1201
1202
1203 GOPHER_PROXY [[protocol://]
1204
1205
1206 Sets proxy server to use for GOPHER.
1207
1208
1209 ALL_PROXY [[protocol://]
1210
1211
1212 Sets proxy server to use if no protocol-specific proxy is
1213 set.
1214
1215
1216 NO_PROXY
1217
1218
1219 list of host names that shouldn't go through any proxy. If
1220 set to a asterisk
1221 !!EXIT CODES
1222
1223
1224 There exists a bunch of different error codes and their
1225 corresponding error messages that may appear during bad
1226 conditions. At the time of this writing, the exit codes
1227 are:
1228
1229
1230 1
1231
1232
1233 Unsupported protocol. This build of curl has no support for
1234 this protocol.
1235
1236
1237 2
1238
1239
1240 Failed to initialize.
1241
1242
1243 3
1244
1245
1246 URL malformat. The syntax was not correct.
1247
1248
1249 4
1250
1251
1252 URL user malformatted. The user-part of the URL syntax was
1253 not correct.
1254
1255
1256 5
1257
1258
1259 Couldn't resolve proxy. The given proxy host could not be
1260 resolved.
1261
1262
1263 6
1264
1265
1266 Couldn't resolve host. The given remote host was not
1267 resolved.
1268
1269
1270 7
1271
1272
1273 Failed to connect to host.
1274
1275
1276 8
1277
1278
1279 FTP weird server reply. The server sent data curl couldn't
1280 parse.
1281
1282
1283 9
1284
1285
1286 FTP access denied. The server denied login.
1287
1288
1289 10
1290
1291
1292 FTP user/password incorrect. Either one or both were not
1293 accepted by the server.
1294
1295
1296 11
1297
1298
1299 FTP weird PASS reply. Curl couldn't parse the reply sent to
1300 the PASS request.
1301
1302
1303 12
1304
1305
1306 FTP weird USER reply. Curl couldn't parse the reply sent to
1307 the USER request.
1308
1309
1310 13
1311
1312
1313 FTP weird PASV reply, Curl couldn't parse the reply sent to
1314 the PASV request.
1315
1316
1317 14
1318
1319
1320 FTP weird 227 format. Curl couldn't parse the 227-line the
1321 server sent.
1322
1323
1324 15
1325
1326
1327 FTP can't get host. Couldn't resolve the host IP we got in
1328 the 227-line.
1329
1330
1331 16
1332
1333
1334 FTP can't reconnect. Couldn't connect to the host we got in
1335 the 227-line.
1336
1337
1338 17
1339
1340
1341 FTP couldn't set binary. Couldn't change transfer method to
1342 binary.
1343
1344
1345 18
1346
1347
1348 Partial file. Only a part of the file was
1349 transfered.
1350
1351
1352 19
1353
1354
1355 FTP couldn't RETR file. The RETR command
1356 failed.
1357
1358
1359 20
1360
1361
1362 FTP write error. The transfer was reported bad by the
1363 server.
1364
1365
1366 21
1367
1368
1369 FTP quote error. A quote command returned error from the
1370 server.
1371
1372
1373 22
1374
1375
1376 HTTP not found. The requested page was not found. This
1377 return code only appears if --fail is used.
1378
1379
1380 23
1381
1382
1383 Write error. Curl couldn't write data to a local filesystem
1384 or similar.
1385
1386
1387 24
1388
1389
1390 Malformat user. User name badly specified.
1391
1392
1393 25
1394
1395
1396 FTP couldn't STOR file. The server denied the STOR
1397 operation.
1398
1399
1400 26
1401
1402
1403 Read error. Various reading problems.
1404
1405
1406 27
1407
1408
1409 Out of memory. A memory allocation request
1410 failed.
1411
1412
1413 28
1414
1415
1416 Operation timeout. The specified time-out period was reached
1417 according to the conditions.
1418
1419
1420 29
1421
1422
1423 FTP couldn't set ASCII. The server returned an unknown
1424 reply.
1425
1426
1427 30
1428
1429
1430 FTP PORT failed. The PORT command failed.
1431
1432
1433 31
1434
1435
1436 FTP couldn't use REST. The REST command failed.
1437
1438
1439 32
1440
1441
1442 FTP couldn't use SIZE. The SIZE command failed. The command
1443 is an extension to the original FTP spec RFC
1444 959.
1445
1446
1447 33
1448
1449
1450 HTTP range error. The range
1451
1452
1453 34
1454
1455
1456 HTTP post error. Internal post-request generation
1457 error.
1458
1459
1460 35
1461
1462
1463 SSL connect error. The SSL handshaking failed.
1464
1465
1466 36
1467
1468
1469 FTP bad download resume. Couldn't continue an earlier
1470 aborted download.
1471
1472
1473 37
1474
1475
1476 FILE couldn't read file. Failed to open the file.
1477 Permissions?
1478
1479
1480 38
1481
1482
1483 LDAP cannot bind. LDAP bind operation failed.
1484
1485
1486 39
1487
1488
1489 LDAP search failed.
1490
1491
1492 40
1493
1494
1495 Library not found. The LDAP library was not
1496 found.
1497
1498
1499 41
1500
1501
1502 Function not found. A required LDAP function was not
1503 found.
1504
1505
1506 42
1507
1508
1509 Aborted by callback. An application told curl to abort the
1510 operation.
1511
1512
1513 43
1514
1515
1516 Internal error. A function was called with a bad
1517 parameter.
1518
1519
1520 44
1521
1522
1523 Internal error. A function was called in a bad
1524 order.
1525
1526
1527 45
1528
1529
1530 Interface error. A specified outgoing interface could not be
1531 used.
1532
1533
1534 46
1535
1536
1537 Bad password entered. An error was signaled when the
1538 password was entered.
1539
1540
1541 47
1542
1543
1544 Too many redirects. When following redirects, curl hit the
1545 maximum amount.
1546
1547
1548 48
1549
1550
1551 Unknown TELNET option specified.
1552
1553
1554 49
1555
1556
1557 Malformed telnet option.
1558
1559
1560 51
1561
1562
1563 The remote peer's SSL certificate wasn't ok
1564
1565
1566 52
1567
1568
1569 The server didn't reply anything, which here is considered
1570 an error.
1571
1572
1573 XX
1574
1575
1576 There will appear more error codes here in future releases.
1577 The existing ones are meant to never change.
1578 !!BUGS
1579
1580
1581 If you do find bugs, mail them to
1582 curl-bug@haxx.se.
1583 !!AUTHORS / CONTRIBUTORS
1584
1585
1586 Daniel Stenberg is the main author, but the whole list of
1587 contributors is found in the separate THANKS
1588 file.
1589 !!WWW
1590
1591
1592 http://curl.haxx.se
1593 !!FTP
1594
1595
1596 ftp://ftp.sunet.se/pub/www/utilities/curl/
1597 !!SEE ALSO
1598
1599
1600 ftp(1), wget(1), snarf(1)
1601 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.