⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 curl.1

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 1
📖 第 1 页 / 共 5 页
字号:
.\" **************************************************************************.\" *                                  _   _ ____  _.\" *  Project                     ___| | | |  _ \| |.\" *                             / __| | | | |_) | |.\" *                            | (__| |_| |  _ <| |___.\" *                             \___|\___/|_| \_\_____|.\" *.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al..\" *.\" * This software is licensed as described in the file COPYING, which.\" * you should have received as part of this distribution. The terms.\" * are also available at http://curl.haxx.se/docs/copyright.html..\" *.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell.\" * copies of the Software, and permit persons to whom the Software is.\" * furnished to do so, under the terms of the COPYING file..\" *.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY.\" * KIND, either express or implied..\" *.\" * $Id: curl.1,v 1.229 2007-10-13 20:49:51 bagder Exp $.\" **************************************************************************.\".TH curl 1 "21 Sep 2007" "Curl 7.17.1" "Curl Manual".SH NAMEcurl \- transfer a URL.SH SYNOPSIS.B curl [options].I [URL...].SH DESCRIPTION.B curlis a tool to transfer data from or to a server, using one of the supportedprotocols (HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP orFILE).  The command is designed to work without user interaction.curl offers a busload of useful tricks like proxy support, userauthentication, ftp upload, HTTP post, SSL connections, cookies, file transferresume and more. As you will see below, the number of features will make yourhead spin!curl is powered by libcurl for all transfer-related features. See.BR libcurl (3)for details..SH URLThe URL syntax is protocol dependent. You'll find a detailed description inRFC 3986.You can specify multiple URLs or parts of URLs by writing part sets withinbraces as in: http://site.{one,two,three}.comor you can get sequences of alphanumeric series by using [] as in: ftp://ftp.numericals.com/file[1-100].txt ftp://ftp.numericals.com/file[001-100].txt    (with leading zeros) ftp://ftp.letters.com/file[a-z].txtNo nesting of the sequences is supported at the moment, but you can useseveral ones next to each other: http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.htmlYou can specify any amount of URLs on the command line. They will be fetchedin a sequential manner in the specified order.Since curl 7.15.1 you can also specify step counter for the ranges, so thatyou can get every Nth number or letter: http://www.numericals.com/file[1-100:10].txt http://www.letters.com/file[a-z:2].txtIf you specify URL without protocol:// prefix, curl will attempt to guess whatprotocol you might want. It will then default to HTTP but try other protocolsbased on often-used host name prefixes. For example, for host names startingwith "ftp." curl will assume you want to speak FTP.Curl will attempt to re-use connections for multiple file transfers, so thatgetting many files from the same server will not do multiple connects /handshakes. This improves speed. Of course this is only done on filesspecified on a single command line and cannot be used between separate curlinvokes..SH "PROGRESS METER"curl normally displays a progress meter during operations, indicating amountof transfered data, transfer speeds and estimated time left etc.However, since curl displays data to the terminal by default, if you invokecurl to do an operation and it is about to write data to the terminal, it\fIdisables\fP the progress meter as otherwise it would mess up the outputmixing progress meter and response data.If you want a progress meter for HTTP POST or PUT requests, you need toredirect the response output to a file, using shell redirect (>), -o [file] orsimilar.It is not the same case for FTP upload as that operation is not spitting outany response data to the terminal.If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is yourfriend..SH OPTIONS.IP "-a/--append"(FTP) When used in an FTP upload, this will tell curl to append to the targetfile instead of overwriting it. If the file doesn't exist, it will be created.If this option is used twice, the second one will disable append mode again..IP "-A/--user-agent <agent string>"(HTTP) Specify the User-Agent string to send to the HTTP server. Some badlydone CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks inthe string, surround the string with single quote marks. This can also be setwith the \fI-H/--header\fP option of course.If this option is set more than once, the last one will be the one that'sused..IP "--anyauth"(HTTP) Tells curl to figure out authentication method by itself, and use themost secure one the remote site claims it supports. This is done by firstdoing a request and checking the response-headers, thus inducing an extranetwork round-trip. This is used instead of setting a specific authenticationmethod, which you can do with \fI--basic\fP, \fI--digest\fP, \fI--ntlm\fP, and\fI--negotiate\fP.Note that using --anyauth is not recommended if you do uploads from stdin,since it may require data to be sent twice and then the client must be able torewind. If the need should arise when uploading from stdin, the uploadoperation will fail.If this option is used several times, the following occurrences make nodifference..IP "-b/--cookie <name=data>"(HTTP)Pass the data to the HTTP server as a cookie. It is supposedly thedata previously received from the server in a "Set-Cookie:" line.The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".If no '=' letter is used in the line, it is treated as a filename to use toread previously stored cookie lines from, which should be used in this sessionif they match. Using this method also activates the "cookie parser" which willmake curl record incoming cookies too, which may be handy if you're using thisin combination with the \fI-L/--location\fP option. The file format of thefile to read cookies from should be plain HTTP headers or the Netscape/Mozillacookie file format.\fBNOTE\fP that the file specified with \fI-b/--cookie\fP is only used asinput. No cookies will be stored in the file. To store cookies, use the\fI-c/--cookie-jar\fP option or you could even save the HTTP headers to a fileusing \fI-D/--dump-header\fP!If this option is set more than once, the last one will be the one that'sused..IP "-B/--use-ascii"Enable ASCII transfer when using FTP or LDAP. For FTP, this can also beenforced by using an URL that ends with ";type=A". This option causes datasent to stdout to be in text mode for win32 systems.If this option is used twice, the second one will disable ASCII usage..IP "--basic"(HTTP) Tells curl to use HTTP Basic authentication. This is the default andthis option is usually pointless, unless you use it to override a previouslyset option that sets a different authentication method (such as \fI--ntlm\fP,\fI--digest\fP and \fI--negotiate\fP).If this option is used several times, the following occurrences make nodifference..IP "--ciphers <list of ciphers>"(SSL) Specifies which ciphers to use in the connection. The list of ciphersmust be using valid ciphers. Read up on SSL cipher list details on this URL:\fIhttp://www.openssl.org/docs/apps/ciphers.html\fPNSS ciphers are done differently than OpenSSL and GnuTLS. The full list ofNSS ciphers is in the NSSCipherSuite entry at this URL:\fIhttp://directory.fedora.redhat.com/docs/mod_nss.html#Directives\fPIf this option is used several times, the last one will override the others..IP "--compressed"(HTTP) Request a compressed response using one of the algorithms libcurlsupports, and return the uncompressed document.  If this option is used andthe server sends an unsupported encoding, Curl will report an error.If this option is used several times, each occurrence will toggle it on/off..IP "--connect-timeout <seconds>"Maximum time in seconds that you allow the connection to the server to take.This only limits the connection phase, once curl has connected this option isof no more use. See also the \fI-m/--max-time\fP option.If this option is used several times, the last one will be used..IP "-c/--cookie-jar <file name>"Specify to which file you want curl to write all cookies after a completedoperation. Curl writes all cookies previously read from a specified file aswell as all cookies received from remote server(s). If no cookies are known,no file will be written. The file will be written using the Netscape cookiefile format. If you set the file name to a single dash, "-", the cookies willbe written to stdout..B NOTEIf the cookie jar can't be created or written to, the whole curl operationwon't fail or even report an error clearly. Using -v will get a warningdisplayed, but that is the only visible feedback you get about this possiblylethal situation.If this option is used several times, the last specified file name will beused..IP "-C/--continue-at <offset>"Continue/Resume a previous file transfer at the given offset. The given offsetis the exact number of bytes that will be skipped counted from the beginningof the source file before it is transferred to the destination.  If used withuploads, the ftp server command SIZE will not be used by curl.Use "-C -" to tell curl to automatically find out where/how to resume thetransfer. It then uses the given output/input files to figure that out.If this option is used several times, the last one will be used..IP "--create-dirs"When used in conjunction with the -o option, curl will create the necessarylocal directory hierarchy as needed. This option creates the dirs mentionedwith the -o option, nothing else. If the -o file name uses no dir or if thedirs it mentions already exist, no dir will be created.To create remote directories when using FTP or SFTP, try \fI--ftp-create-dirs\fP..IP "--crlf"(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).If this option is used several times, the following occurrences make nodifference..IP "-d/--data <data>"(HTTP) Sends the specified data in a POST request to the HTTP server, in a waythat can emulate as if a user has filled in a HTML form and pressed the submitbutton. Note that the data is sent exactly as specified with no extraprocessing (with all newlines cut off).  The data is expected to be\&"url-encoded". This will cause curl to pass the data to the server using thecontent-type application/x-www-form-urlencoded. Compare to \fI-F/--form\fP. Ifthis option is used more than once on the same command line, the data piecesspecified will be merged together with a separating &-letter. Thus, using '-dname=daniel -d skill=lousy' would generate a post chunk that looks like\&'name=daniel&skill=lousy'.If you start the data with the letter @, the rest should be a file name toread the data from, or - if you want curl to read the data from stdin.  Thecontents of the file must already be url-encoded. Multiple files can also bespecified. Posting data from a file named 'foobar' would thus be done with\fI--data\fP @foobar".To post data purely binary, you should instead use the \fI--data-binary\fPoption.\fI-d/--data\fP is the same as \fI--data-ascii\fP.If this option is used several times, the ones following the first willappend data..IP "--data-ascii <data>"(HTTP) This is an alias for the \fI-d/--data\fP option.If this option is used several times, the ones following the first willappend data..IP "--data-binary <data>"(HTTP) This posts data in a similar manner as \fI--data-ascii\fP does,although when using this option the entire context of the posted data is keptas-is. If you want to post a binary file without the strip-newlines feature ofthe \fI--data-ascii\fP option, this is for you.If this option is used several times, the ones following the first willappend data..IP "--digest"(HTTP) Enables HTTP Digest authentication. This is a authentication thatprevents the password from being sent over the wire in clear text. Use this incombination with the normal \fI-u/--user\fP option to set user name andpassword. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP forrelated options.If this option is used several times, the following occurrences make nodifference..IP "--disable-eprt"(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doingactive FTP transfers. Curl will normally always first attempt to use EPRT,then LPRT before using PORT, but with this option, it will use PORT rightaway. EPRT and LPRT are extensions to the original FTP protocol, may not workon all servers but enable more functionality in a better way than thetraditional PORT command.If this option is used several times, each occurrence will toggle this on/off..IP "--disable-epsv"(FTP) Tell curl to disable the use of the EPSV command when doing passive FTPtransfers. Curl will normally always first attempt to use EPSV before PASV,but with this option, it will not try using EPSV.If this option is used several times, each occurrence will toggle this on/off..IP "-D/--dump-header <file>"Write the protocol headers to the specified file.This option is handy to use when you want to store the headers that a HTTPsite sends to you. Cookies from the headers could then be read in a secondcurl invoke by using the \fI-b/--cookie\fP option! The \fI-c/--cookie-jar\fPoption is however a better way to store cookies.When used on FTP, the ftp server response lines are considered being "headers"and thus are saved there.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -