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

📄 curl.1

📁 功能最强大的网络爬虫,希望大家好好学习啊,好好研究啊
💻 1
📖 第 1 页 / 共 5 页
字号:
will retry this number of times before giving up. Setting the number to 0makes curl do no retries (which is the default). Transient error means either:a timeout, an FTP 5xx response code or an HTTP 5xx response code.When curl is about to retry a transfer, it will first wait one second and thenfor all forthcoming retries it will double the waiting time until it reaches10 minutes which then will be the delay between the rest of the retries.  Byusing \fI--retry-delay\fP you disable this exponential backoff algorithm. Seealso \fI--retry-max-time\fP to limit the total time allowed forretries. (Added in 7.12.3)If this option is used multiple times, the last occurrence decide the amount..IP "--retry-delay <seconds>"Make curl sleep this amount of time between each retry when a transfer hasfailed with a transient error (it changes the default backoff time algorithmbetween retries). This option is only interesting if \fI--retry\fP is alsoused. Setting this delay to zero will make curl use the default backoff time.(Added in 7.12.3)If this option is used multiple times, the last occurrence decide the amount..IP "--retry-max-time <seconds>"The retry timer is reset before the first transfer attempt. Retries will bedone as usual (see \fI--retry\fP) as long as the timer hasn't reached thisgiven limit. Notice that if the timer hasn't reached the limit, the requestwill be made and while performing, it may take longer than this given timeperiod. To limit a single request\'s maximum time, use \fI-m/--max-time\fP.Set this option to zero to not timeout retries. (Added in 7.12.3)If this option is used multiple times, the last occurrence decide the amount..IP "-s/--silent"Silent mode. Don't show progress meter or error messages.  MakesCurl mute.If this option is used twice, the second will again disable silent mode..IP "-S/--show-error"When used with -s it makes curl show error message if it fails.If this option is used twice, the second will again disable show error..IP "--socks4 <host[:port]>"Use the specified SOCKS4 proxy. If the port number is not specified, it isassumed at port 1080. (Added in 7.15.2)This option overrides any previous use of \fI-x/--proxy\fP, as they aremutually exclusive.If this option is used several times, the last one will be used..IP "--socks5 <host[:port]>"Use the specified SOCKS5 proxy. If the port number is not specified, it isassumed at port 1080. (Added in 7.11.1)This option overrides any previous use of \fI-x/--proxy\fP, as they aremutually exclusive.If this option is used several times, the last one will be used. (This optionwas previously wrongly documented and used as --socks without the numberappended.).IP "--stderr <file>"Redirect all writes to stderr to the specified file instead. If the file nameis a plain '-', it is instead written to stdout. This option has no point whenyou're using a shell with decent redirecting capabilities.If this option is used several times, the last one will be used..IP "--tcp-nodelay"Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page fordetails about this option. (Added in 7.11.2)If this option is used several times, each occurrence toggles this on/off..IP "-t/--telnet-option <OPT=val>"Pass options to the telnet protocol. Supported options are:TTYPE=<term> Sets the terminal type.XDISPLOC=<X display> Sets the X display location.NEW_ENV=<var,val> Sets an environment variable..IP "-T/--upload-file <file>"This transfers the specified local file to the remote URL. If there is no filepart in the specified URL, Curl will append the local file name. NOTE that youmust use a trailing / on the last directory to really prove to Curl that thereis no file name or curl will think that your last directory name is the remotefile name to use. That will most likely cause the upload operation to fail. Ifthis is used on a http(s) server, the PUT command will be used.Use the file name "-" (a single dash) to use stdin instead of a given file.You can specify one -T for each URL on the command line. Each -T + URL pairspecifies what to upload and to where. curl also supports "globbing" of the -Targument, meaning that you can upload multiple files to a single URL by usingthe same URL globbing style supported in the URL, like this:curl -T "{file1,file2}" http://www.uploadtothissite.comor evencurl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/.IP "--trace <file>"Enables a full trace dump of all incoming and outgoing data, includingdescriptive information, to the given output file. Use "-" as filename to havethe output sent to stdout.If this option is used several times, the last one will be used..IP "--trace-ascii <file>"Enables a full trace dump of all incoming and outgoing data, includingdescriptive information, to the given output file. Use "-" as filename to havethe output sent to stdout.This is very similar to \fI--trace\fP, but leaves out the hex part and onlyshows the ASCII part of the dump. It makes smaller output that might be easierto read for untrained humans.If this option is used several times, the last one will be used..IP "--trace-time"Prepends a time stamp to each trace or verbose line that curl displays.(Added in 7.14.0)If this option is used several times, each occurrence will toggle it on/off..IP "-u/--user <user:password>"Specify user and password to use for server authentication. Overrides\fI-n/--netrc\fP and \fI--netrc-optional\fP.If you use an SSPI-enabled curl binary and do NTLM autentication, you canforce curl to pick up the user name and password from your environment bysimply specifying a single colon with this option: "-u :".If this option is used several times, the last one will be used..IP "-U/--proxy-user <user:password>"Specify user and password to use for proxy authentication.If you use an SSPI-enabled curl binary and do NTLM autentication, you canforce curl to pick up the user name and password from your environment bysimply specifying a single colon with this option: "-U :".If this option is used several times, the last one will be used..IP "--url <URL>"Specify a URL to fetch. This option is mostly handy when you want to specifyURL(s) in a config file.This option may be used any number of times. To control where this URL iswritten, use the \fI-o/--output\fP or the \fI-O/--remote-name\fP options..IP "-v/--verbose"Makes the fetching more verbose/talkative. Mostly usable for debugging. Linesstarting with '>' means "header data" sent by curl, '<' means "header data"received by curl that is hidden in normal cases and lines starting with '*'means additional info provided by curl.Note that if you only want HTTP headers in the output, \fI-i/--include\fPmight be option you're looking for.If you think this option still doesn't give you enough details, consider using\fI--trace\fP or \fI--trace-ascii\fP instead.If this option is used twice, the second will again disable verbose..IP "-V/--version"Displays information about curl and the libcurl version it uses.The first line includes the full version of curl, libcurl and other 3rd partylibraries linked with the executable.The second line (starts with "Protocols:") shows all protocols that libcurlreports to support.The third line (starts with "Features:") shows specific features libcurlreports to offer. Available features include:.RS.IP "IPv6"You can use IPv6 with this..IP "krb4"Krb4 for ftp is supported..IP "SSL"HTTPS and FTPS are supported..IP "libz"Automatic decompression of compressed files over HTTP is supported..IP "NTLM"NTLM authentication is supported..IP "GSS-Negotiate"Negotiate authentication is supported..IP "Debug"This curl uses a libcurl built with Debug. This enables more error-trackingand memory debugging etc. For curl-developers only!.IP "AsynchDNS"This curl uses asynchronous name resolves..IP "SPNEGO"SPNEGO Negotiate authentication is supported..IP "Largefile"This curl supports transfers of large files, files larger than 2GB..IP "IDN"This curl supports IDN - international domain names..IP "SSPI"SSPI is supported. If you use NTLM and set a blank user name, curl willauthenticate with your current user and password..RE.IP "-w/--write-out <format>"Defines what to display on stdout after a completed and successfuloperation. The format is a string that may contain plain text mixed with anynumber of variables. The string can be specified as "string", to get read froma particular file you specify it "@filename" and to tell curl to read theformat from stdin you write "@-".The variables present in the output format will be substituted by the value ortext that curl thinks fit, as described below. All variables are specifiedlike %{variable_name} and to output a normal % you just write them like%%. You can output a newline by using \\n, a carriage return with \\r and a tabspace with \\t..B NOTE:The %-letter is a special letter in the win32-environment, where alloccurrences of % must be doubled when using this option.Available variables are at this point:.RS.TP 15.B url_effectiveThe URL that was fetched last. This is mostly meaningful if you've told curlto follow location: headers..TP.B http_codeThe numerical code that was found in the last retrieved HTTP(S) page..TP.B http_connectThe numerical code that was found in the last response (from a proxy) to acurl CONNECT request. (Added in 7.12.4).TP.B time_totalThe total time, in seconds, that the full operation lasted. The time will bedisplayed with millisecond resolution..TP.B time_namelookupThe time, in seconds, it took from the start until the name resolving wascompleted..TP.B time_connectThe time, in seconds, it took from the start until the connect to the remotehost (or proxy) was completed..TP.B time_pretransferThe time, in seconds, it took from the start until the file transfer is justabout to begin. This includes all pre-transfer commands and negotiations thatare specific to the particular protocol(s) involved..TP.B time_redirectThe time, in seconds, it took for all redirection steps include name lookup,connect, pretransfer and transfer before final transaction wasstarted. time_redirect shows the complete execution time for multipleredirections. (Added in 7.12.3).TP.B time_starttransferThe time, in seconds, it took from the start until the first byte is just aboutto be transferred. This includes time_pretransfer and also the time theserver needs to calculate the result..TP.B size_downloadThe total amount of bytes that were downloaded..TP.B size_uploadThe total amount of bytes that were uploaded..TP.B size_headerThe total amount of bytes of the downloaded headers..TP.B size_requestThe total amount of bytes that were sent in the HTTP request..TP.B speed_downloadThe average download speed that curl measured for the complete download..TP.B speed_uploadThe average upload speed that curl measured for the complete upload..TP.B content_typeThe Content-Type of the requested document, if there was any..TP.B num_connectsNumber of new connects made in the recent transfer. (Added in 7.12.3).TP.B num_redirectsNumber of redirects that were followed in the request. (Added in 7.12.3).TP.B ftp_entry_pathThe initial path libcurl ended up in when logging on to the remote FTPserver. (Added in 7.15.4).REIf this option is used several times, the last one will be used..IP "-x/--proxy <proxyhost[:port]>"Use specified HTTP proxy. If the port number is not specified, it is assumedat port 1080.This option overrides existing environment variables that sets proxy touse. If there's an environment variable setting a proxy, you can set proxy to\&"" to override it.

⌨️ 快捷键说明

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