?? wget.pod
字號:
=head1 NAMEWget - The non-interactive network downloader.=head1 SYNOPSISwget [I<option>]... [I<URL>]...=head1 DESCRIPTIONGNU Wget is a free utility for non-interactive download of files fromthe Web. It supports HTTP, HTTPS, and FTP protocols, aswell as retrieval through HTTP proxies.Wget is non-interactive, meaning that it can work in the background,while the user is not logged on. This allows you to start a retrievaland disconnect from the system, letting Wget finish the work. Bycontrast, most of the Web browsers require constant user's presence,which can be a great hindrance when transferring a lot of data.Wget can follow links in HTML and XHTML pages and create local versions of remote web sites, fully recreating the directory structure of the original site. This is sometimes referred to as "recursivedownloading." While doing that, Wget respects the Robot ExclusionStandard (F</robots.txt>). Wget can be instructed to convert thelinks in downloaded HTML files to the local files for offlineviewing.Wget has been designed for robustness over slow or unstable networkconnections; if a download fails due to a network problem, it willkeep retrying until the whole file has been retrieved. If the serversupports regetting, it will instruct the server to continue thedownload from where it left off.=head1 OPTIONS=head2 Option SyntaxSince Wget uses GNU getopt to process command-line arguments, everyoption has a long form along with the short one. Long options aremore convenient to remember, but take time to type. You may freelymix different option styles, or specify options after the command-linearguments. Thus you may write: wget -r --tries=10 http://fly.srk.fer.hr/ -o logThe space between the option accepting an argument and the argument maybe omitted. Instead of B<-o log> you can write B<-olog>.You may put several options that do not require arguments together,like: wget -drc <URL>This is a complete equivalent of: wget -d -r -c <URL>Since the options can be specified after the arguments, you mayterminate them with B<-->. So the following will try to downloadURL B<-x>, reporting failure to F<log>: wget -o log -- -xThe options that accept comma-separated lists all respect the conventionthat specifying an empty list clears its value. This can be useful toclear the F<.wgetrc> settings. For instance, if your F<.wgetrc>sets C<exclude_directories> to F</cgi-bin>, the followingexample will first reset it, and then set it to exclude F</~nobody>and F</~somebody>. You can also clear the lists in F<.wgetrc>. wget -X " -X /~nobody,/~somebodyMost options that do not accept arguments are I<boolean> options,so named because their state can be captured with a yes-or-no("boolean") variable. For example, B<--follow-ftp> tells Wgetto follow FTP links from HTML files and, on the other hand,B<--no-glob> tells it not to perform file globbing on FTP URLs. Aboolean option is either I<affirmative> or I<negative>(beginning with B<--no>). All such options share severalproperties.Unless stated otherwise, it is assumed that the default behavior isthe opposite of what the option accomplishes. For example, thedocumented existence of B<--follow-ftp> assumes that the defaultis to I<not> follow FTP links from HTML pages.Affirmative options can be negated by prepending the B<--no-> tothe option name; negative options can be negated by omitting theB<--no-> prefix. This might seem superfluous---if the default foran affirmative option is to not do something, then why provide a wayto explicitly turn it off? But the startup file may in fact changethe default. For instance, using C<follow_ftp = off> inF<.wgetrc> makes Wget I<not> follow FTP links by default, andusing B<--no-follow-ftp> is the only way to restore the factorydefault from the command line.=head2 Basic Startup Options=over 4=item B<-V>=item B<--version>Display the version of Wget.=item B<-h>=item B<--help>Print a help message describing all of Wget's command-line options.=item B<-b>=item B<--background>Go to background immediately after startup. If no output file isspecified via the B<-o>, output is redirected to F<wget-log>.=item B<-e> I<command>=item B<--execute> I<command>Execute I<command> as if it were a part of F<.wgetrc>. A command thus invoked will be executedI<after> the commands in F<.wgetrc>, thus taking precedence overthem. If you need to specify more than one wgetrc command, use multipleinstances of B<-e>.=back=head2 Logging and Input File Options=over 4=item B<-o> I<logfile>=item B<--output-file=>I<logfile>Log all messages to I<logfile>. The messages are normally reportedto standard error.=item B<-a> I<logfile>=item B<--append-output=>I<logfile>Append to I<logfile>. This is the same as B<-o>, only it appendsto I<logfile> instead of overwriting the old log file. IfI<logfile> does not exist, a new file is created.=item B<-d>=item B<--debug>Turn on debug output, meaning various information important to thedevelopers of Wget if it does not work properly. Your systemadministrator may have chosen to compile Wget without debug support, inwhich case B<-d> will not work. Please note that compiling withdebug support is always safe---Wget compiled with the debug support willI<not> print any debug info unless requested with B<-d>.=item B<-q>=item B<--quiet>Turn off Wget's output.=item B<-v>=item B<--verbose>Turn on verbose output, with all the available data. The default outputis verbose.=item B<-nv>=item B<--no-verbose>Turn off verbose without being completely quiet (use B<-q> forthat), which means that error messages and basic information still getprinted.=item B<-i> I<file>=item B<--input-file=>I<file>Read URLs from I<file>. If B<-> is specified asI<file>, URLs are read from the standard input. (UseB<./-> to read from a file literally named B<->.)If this function is used, no URLs need be present on the commandline. If there are URLs both on the command line and in an inputfile, those on the command lines will be the first ones to beretrieved. The I<file> need not be an HTML document (but noharm if it is)---it is enough if the URLs are just listedsequentially.However, if you specify B<--force-html>, the document will beregarded as B<html>. In that case you may have problems withrelative links, which you can solve either by adding C<E<lt>basehref="I<url>"E<gt>> to the documents or by specifyingB<--base=>I<url> on the command line.=item B<-F>=item B<--force-html>When input is read from a file, force it to be treated as an HTMLfile. This enables you to retrieve relative links from existingHTML files on your local disk, by adding C<E<lt>basehref="I<url>"E<gt>> to HTML, or using the B<--base> command-lineoption.=item B<-B> I<URL>=item B<--base=>I<URL>Prepends I<URL> to relative links read from the file specified withthe B<-i> option.=back=head2 Download Options=over 4=item B<--bind-address=>I<ADDRESS>When making client TCP/IP connections, bind to I<ADDRESS> onthe local machine. I<ADDRESS> may be specified as a hostname or IPaddress. This option can be useful if your machine is bound to multipleIPs.=item B<-t> I<number>=item B<--tries=>I<number>Set number of retries to I<number>. Specify 0 or B<inf> forinfinite retrying. The default is to retry 20 times, with the exceptionof fatal errors like "connection refused" or "not found" (404),which are not retried.=item B<-O> I<file>=item B<--output-document=>I<file>The documents will not be written to the appropriate files, but allwill be concatenated together and written to I<file>. If B<->is used as I<file>, documents will be printed to standard output,disabling link conversion. (Use B<./-> to print to a fileliterally named B<->.)Use of B<-O> is I<not> intended to mean simply "use the nameI<file> instead of the one in the URL;" rather, it isanalogous to shell redirection:B<wget -O file http://foo> is intended to work likeB<wget -O - http://foo E<gt> file>; F<file> will be truncatedimmediately, and I<all> downloaded content will be written there.Note that a combination with B<-k> is only permitted whendownloading a single document, and combination with any of B<-r>,B<-p>, or B<-N> is not allowed.=item B<-nc>=item B<--no-clobber>If a file is downloaded more than once in the same directory, Wget'sbehavior depends on a few options, including B<-nc>. In certaincases, the local file will be I<clobbered>, or overwritten, uponrepeated download. In other cases it will be preserved.When running Wget without B<-N>, B<-nc>, B<-r>, or B<p>,downloading the same file in the same directory will result in theoriginal copy of I<file> being preserved and the second copy beingnamed I<file>B<.1>. If that file is downloaded yet again, thethird copy will be named I<file>B<.2>, and so on. WhenB<-nc> is specified, this behavior is suppressed, and Wget willrefuse to download newer copies of I<file>. Therefore,"C<no-clobber>" is actually a misnomer in this mode---it's notclobbering that's prevented (as the numeric suffixes were alreadypreventing clobbering), but rather the multiple version saving that'sprevented.When running Wget with B<-r> or B<-p>, but without B<-N>or B<-nc>, re-downloading a file will result in the new copysimply overwriting the old. Adding B<-nc> will prevent thisbehavior, instead causing the original version to be preserved and anynewer copies on the server to be ignored.When running Wget with B<-N>, with or without B<-r> orB<-p>, the decision as to whether or not to download a newer copyof a file depends on the local and remote timestamp and size of thefile. B<-nc> may not be specified at thesame time as B<-N>.Note that when B<-nc> is specified, files with the suffixesB<.html> or B<.htm> will be loaded from the local disk andparsed as if they had been retrieved from the Web.=item B<-c>=item B<--continue>Continue getting a partially-downloaded file. This is useful when youwant to finish up a download started by a previous instance of Wget, orby another program. For instance: wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.ZIf there is a file named F<ls-lR.Z> in the current directory, Wgetwill assume that it is the first portion of the remote file, and willask the server to continue the retrieval from an offset equal to thelength of the local file.Note that you don't need to specify this option if you just want thecurrent invocation of Wget to retry downloading a file should theconnection be lost midway through. This is the default behavior.B<-c> only affects resumption of downloads started I<prior> tothis invocation of Wget, and whose local files are still sitting around.Without B<-c>, the previous example would just download the remotefile to F<ls-lR.Z.1>, leaving the truncated F<ls-lR.Z> filealone.Beginning with Wget 1.7, if you use B<-c> on a non-empty file, andit turns out that the server does not support continued downloading,
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -