{"id":54,"date":"2005-02-12T18:15:09","date_gmt":"2005-02-12T10:15:09","guid":{"rendered":"http:\/\/yesybl.org\/blogcn\/2005\/02\/12\/54\/"},"modified":"2005-02-12T18:15:09","modified_gmt":"2005-02-12T10:15:09","slug":"linuxiauaaioi-wgeteoaoe-2","status":"publish","type":"post","link":"https:\/\/www.yesybl.com\/?p=54","title":{"rendered":"linux\u73af\u5883\u4e0b\u7684&#8221;\u8682\u8681&#8221;-wget\u4f7f\u7528\u7b80\u4ecb"},"content":{"rendered":"<p>wget\u7684\u4f7f\u7528\u5f62\u5f0f\u662f\uff1a<br \/>wget&#160;[\u53c2\u6570\u5217\u8868]&#160;URL<br \/>\u9996\u5148\u6765\u4ecb\u7ecd\u4e00\u4e0bwget\u7684\u4e3b\u8981\u53c2\u6570\uff1a<br \/>\u30fb&#160;-b\uff1a\u8ba9wget\u5728\u540e\u53f0\u8fd0\u884c\uff0c\u8bb0\u5f55\u6587\u4ef6\u5199\u5728\u5f53\u524d\u76ee\u5f55\u4e0b&quot;wget-log&quot;\u6587\u4ef6\u4e2d\uff1b<br \/>\u30fb&#160;-t&#160;[nuber&#160;of&#160;times]\uff1a\u5c1d\u8bd5\u6b21\u6570\uff0c\u5f53wget\u65e0\u6cd5\u4e0e\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\u65f6\uff0c\u5c1d\u8bd5\u8fde\u63a5\u591a\u5c11\u6b21<br \/>\u3002\u6bd4\u5982&quot;-t<br \/>120&quot;\u8868\u793a\u5c1d\u8bd5120\u6b21\u3002\u5f53\u8fd9\u4e00\u9879\u4e3a&quot;0&quot;\u7684\u65f6\u5019\uff0c\u6307\u5b9a\u5c1d\u8bd5\u65e0\u7a77\u591a\u6b21\u76f4\u5230\u8fde\u63a5\u6210\u529f\u4e3a\u6b62\uff0c\u8fd9\u4e2a<br \/>\u8bbe\u7f6e\u975e\u5e38\u6709\u7528\uff0c\u5f53\u5bf9\u65b9\u670d\u52a1\u5668\u7a81\u7136\u5173\u673a\u6216\u8005\u7f51\u7edc\u7a81\u7136\u4e2d\u65ad\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u5728\u6062\u590d\u6b63\u5e38\u540e\u7ee7\u7eed<br \/>\u4e0b\u8f7d\u6ca1\u6709\u4f20\u5b8c\u7684\u6587\u4ef6\uff1b<br \/>\u30fb&#160;-c\uff1a\u65ad\u70b9\u7eed\u4f20\uff0c\u8fd9\u4e5f\u662f\u4e2a\u975e\u5e38\u6709\u7528\u7684\u8bbe\u7f6e\uff0c\u7279\u522b\u5f53\u4e0b\u8f7d\u6bd4\u8f83\u5927\u7684\u6587\u4ef6\u7684\u65f6\u5019\uff0c\u5982\u679c\u4e2d<br \/>\u9014\u610f\u5916\u4e2d\u65ad\uff0c\u90a3\u4e48\u8fde\u63a5\u6062\u590d\u7684\u65f6\u5019\u4f1a\u4ece\u4e0a\u6b21\u6ca1\u4f20\u5b8c\u7684\u5730\u65b9\u63a5\u7740\u4f20\uff0c\u800c\u4e0d\u662f\u53c8\u4ece\u5934\u5f00\u59cb\uff0c\u4f7f<br \/>\u7528\u8fd9\u4e00\u9879\u9700\u8981\u8fdc\u7a0b\u670d\u52a1\u5668\u4e5f\u652f\u6301\u65ad\u70b9\u7eed\u4f20\uff0c\u4e00\u822c\u6765\u8bb2\uff0c\u57fa\u4e8eUNIX\/Linux\u7684Web\/FTP\u670d\u52a1\u5668<br \/>\u90fd\u652f\u6301\u65ad\u70b9\u7eed\u4f20\uff1b<br \/>\u30fb&#160;-T&#160;[number&#160;of&#160;seconds]\uff1a\u8d85\u65f6\u65f6\u95f4\uff0c\u6307\u5b9a\u591a\u957f\u65f6\u95f4\u8fdc\u7a0b\u670d\u52a1\u5668\u6ca1\u6709\u54cd\u5e94\u5c31\u4e2d\u65ad\u8fde\u63a5<br \/>\uff0c\u5f00\u59cb\u4e0b\u4e00\u6b21\u5c1d\u8bd5\u3002\u6bd4\u5982&quot;-T<br \/>120&quot;\u8868\u793a\u5982\u679c120\u79d2\u4ee5\u540e\u8fdc\u7a0b\u670d\u52a1\u5668\u6ca1\u6709\u53d1\u8fc7\u6765\u6570\u636e\uff0c\u5c31\u91cd\u65b0\u5c1d\u8bd5\u8fde\u63a5\u3002\u5982\u679c\u7f51\u7edc\u901f\u5ea6\u6bd4<br \/>\u8f83\u5feb\uff0c\u8fd9\u4e2a\u65f6\u95f4\u53ef\u4ee5\u8bbe\u7f6e\u7684\u77ed\u4e9b\uff0c\u76f8\u53cd\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u7684\u957f\u4e00\u4e9b\uff0c\u4e00\u822c\u6700\u591a\u4e0d\u8d85\u8fc7900\uff0c\u901a\u5e38<br \/>\u4e5f\u4e0d\u5c11\u4e8e60\uff0c\u4e00\u822c\u8bbe\u7f6e\u5728120\u5de6\u53f3\u6bd4\u8f83\u5408\u9002\uff1b<br \/>\u30fb&#160;-w&#160;[number&#160;of&#160;seconds]\uff1a\u5728\u4e24\u6b21\u5c1d\u8bd5\u4e4b\u95f4\u7b49\u5f85\u591a\u5c11\u79d2\uff0c\u6bd4\u5982&quot;-w&#160;100&quot;\u8868\u793a\u4e24\u6b21\u5c1d\u8bd5<br \/>\u4e4b\u95f4\u7b49\u5f85100\u79d2\uff1b<br \/>\u30fb&#160;-Y&#160;on\/off\uff1a\u901a\u8fc7\uff0f\u4e0d\u901a\u8fc7\u4ee3\u7406\u670d\u52a1\u5668\u8fdb\u884c\u8fde\u63a5\uff1b<br \/>\u30fb&#160;-Q&#160;[byetes]\uff1a\u9650\u5236\u4e0b\u8f7d\u6587\u4ef6\u7684\u603b\u5927\u5c0f\u6700\u591a\u4e0d\u80fd\u8d85\u8fc7\u591a\u5c11\uff0c\u6bd4\u5982&quot;-Q2k&quot;\u8868\u793a\u4e0d\u80fd\u8d85\u8fc72K<br \/>\u5b57\u8282\uff0c&quot;-Q3m&quot;\u8868\u793a\u6700\u591a\u4e0d\u80fd\u8d85\u8fc73M\u5b57\u8282\uff0c\u5982\u679c\u6570\u5b57\u540e\u9762\u4ec0\u4e48\u90fd\u4e0d\u52a0\uff0c\u5c31\u8868\u793a\u662f\u4ee5\u5b57\u8282\u4e3a\u5355<br \/>\u4f4d\uff0c\u6bd4\u5982&quot;-Q200&quot;\u8868\u793a\u6700\u591a\u4e0d\u80fd\u8d85\u8fc7200\u5b57\u8282\uff1b<br \/>\u30fb&#160;-nd\uff1a\u4e0d\u4e0b\u8f7d\u76ee\u5f55\u7ed3\u6784\uff0c\u628a\u4ece\u670d\u52a1\u5668\u6240\u6709\u6307\u5b9a\u76ee\u5f55\u4e0b\u8f7d\u7684\u6587\u4ef6\u90fd\u5806\u5230\u5f53\u524d\u76ee\u5f55\u91cc\uff1b<br \/>\u30fb&#160;-x\uff1a\u4e0e&quot;-nd&quot;\u8bbe\u7f6e\u521a\u597d\u76f8\u53cd\uff0c\u521b\u5efa\u5b8c\u6574\u7684\u76ee\u5f55\u7ed3\u6784\uff0c\u4f8b\u5982&quot;wget&#160;-nd<br \/>http:\/\/www.gnu.org&quot;\u5c06\u521b\u5efa\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa&quot;www.gnu.org&quot;\u5b50\u76ee\u5f55\uff0c\u7136\u540e\u6309\u7167\u670d\u52a1\u5668<br \/>\u5b9e\u9645\u7684\u76ee\u5f55\u7ed3\u6784\u4e00\u7ea7\u4e00\u7ea7\u5efa\u4e0b\u53bb\uff0c\u76f4\u5230\u6240\u6709\u7684\u6587\u4ef6\u90fd\u4f20\u5b8c\u4e3a\u6b62\uff1b<br \/>\u30fb&#160;-nH\uff1a\u4e0d\u521b\u5efa\u4ee5\u76ee\u6807\u4e3b\u673a\u57df\u540d\u4e3a\u76ee\u5f55\u540d\u7684\u76ee\u5f55\uff0c\u5c06\u76ee\u6807\u4e3b\u673a\u7684\u76ee\u5f55\u7ed3\u6784\u76f4\u63a5\u4e0b\u5230\u5f53\u524d\u76ee<br \/>\u5f55\u4e0b\uff1b<br \/>\u30fb&#160;&#8211;http-user=username<br \/>\u30fb&#160;&#8211;http-passwd=password\uff1a\u5982\u679cWeb\u670d\u52a1\u5668\u9700\u8981\u6307\u5b9a\u7528\u6237\u540d\u548c\u53e3\u4ee4\uff0c\u7528\u8fd9\u4e24\u9879\u6765\u8bbe\u5b9a\uff1b<br \/>\u30fb&#160;&#8211;proxy-user=username<br \/>\u30fb&#160;&#8211;proxy-passwd=password\uff1a\u5982\u679c\u4ee3\u7406\u670d\u52a1\u5668\u9700\u8981\u8f93\u5165\u7528\u6237\u540d\u548c\u53e3\u4ee4\uff0c\u4f7f\u7528\u8fd9\u4e24\u4e2a\u9009\u9879<br \/>\uff1b<br \/>\u30fb&#160;-r\uff1a\u5728\u672c\u673a\u5efa\u7acb\u670d\u52a1\u5668\u7aef\u76ee\u5f55\u7ed3\u6784\uff1b<br \/>\u30fb&#160;-l&#160;[depth]\uff1a\u4e0b\u8f7d\u8fdc\u7a0b\u670d\u52a1\u5668\u76ee\u5f55\u7ed3\u6784\u7684\u6df1\u5ea6\uff0c\u4f8b\u5982&quot;-l&#160;5&quot;\u4e0b\u8f7d\u76ee\u5f55\u6df1\u5ea6\u5c0f\u4e8e\u6216\u8005\u7b49<br \/>\u4e8e5\u4ee5\u5185\u7684\u76ee\u5f55\u7ed3\u6784\u6216\u8005\u6587\u4ef6\uff1b<br \/>\u30fb&#160;-m\uff1a\u505a\u7ad9\u70b9\u955c\u50cf\u65f6\u7684\u9009\u9879\uff0c\u5982\u679c\u4f60\u60f3\u505a\u4e00\u4e2a\u7ad9\u70b9\u7684\u955c\u50cf\uff0c\u4f7f\u7528\u8fd9\u4e2a\u9009\u9879\uff0c\u5b83\u5c06\u81ea\u52a8\u8bbe<br \/>\u5b9a\u5176\u4ed6\u5408\u9002\u7684\u9009\u9879\u4ee5\u4fbf\u4e8e\u7ad9\u70b9\u955c\u50cf\uff1b<br \/>\u30fb&#160;-np\uff1a\u53ea\u4e0b\u8f7d\u76ee\u6807\u7ad9\u70b9\u6307\u5b9a\u76ee\u5f55\u53ca\u5176\u5b50\u76ee\u5f55\u7684\u5185\u5bb9\u3002\u8fd9\u4e5f\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u9009\u9879\uff0c\u6211\u4eec<br \/>\u5047\u8bbe\u67d0\u4e2a\u4eba\u7684\u4e2a\u4eba\u4e3b\u9875\u91cc\u9762\u6709\u4e00\u4e2a\u6307\u5411\u8fd9\u4e2a\u7ad9\u70b9\u5176\u4ed6\u4eba\u4e2a\u4eba\u4e3b\u9875\u7684\u8fde\u63a5\uff0c\u800c\u6211\u4eec\u53ea\u60f3\u4e0b\u8f7d<br \/>\u8fd9\u4e2a\u4eba\u7684\u4e2a\u4eba\u4e3b\u9875\uff0c\u5982\u679c\u4e0d\u8bbe\u7f6e\u8fd9\u4e2a\u9009\u9879\uff0c\u751a\u81f3&#8211;\u6709\u53ef\u80fd\u628a\u6574\u4e2a\u7ad9\u70b9\u7ed9\u6293\u4e0b\u6765\uff0c\u8fd9\u663e\u7136\u662f<br \/>\u6211\u4eec\u901a\u5e38\u4e0d\u5e0c\u671b\u7684\uff1b<br \/>\u00fc&#160;\u5982\u4f55\u8bbe\u5b9awget\u6240\u4f7f\u7528\u7684\u4ee3\u7406\u670d\u52a1\u5668<br \/>wget\u53ef\u4ee5\u4f7f\u7528\u7528\u6237\u8bbe\u7f6e\u6587\u4ef6&quot;.wgetrc&quot;\u6765\u8bfb\u53d6\u5f88\u591a\u8bbe\u7f6e\uff0c\u6211\u4eec\u8fd9\u91cc\u4e3b\u8981\u5229\u7528\u8fd9\u4e2a\u6587\u4ef6\u6765\u662f<br \/>\u8bbe\u7f6e\u4ee3\u7406\u670d\u52a1\u5668\u3002\u4f7f\u7528\u8005\u7528\u4ec0\u4e48\u7528\u6237\u767b\u5f55\uff0c\u90a3\u4e48\u4ec0\u4e48\u7528\u6237\u4e3b\u76ee\u5f55\u4e0b\u7684&quot;.wgetrc&quot;\u6587\u4ef6\u5c31\u8d77<br \/>\u4f5c\u7528\u3002\u4f8b\u5982\uff0c&quot;root&quot;\u7528\u6237\u5982\u679c\u60f3\u4f7f\u7528&quot;.wgetrc&quot;\u6765\u8bbe\u7f6e\u4ee3\u7406\u670d\u52a1\u5668\uff0c&quot;\/root\/.wgert&quot;\u5c31\u8d77<br \/>\u4f5c\u7528\uff0c\u4e0b\u9762\u7ed9\u51fa\u4e00\u4e2a&quot;.wgetrc&quot;\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u8bfb\u8005\u53ef\u4ee5\u53c2\u7167\u8fd9\u4e2a\u4f8b\u5b50\u6765\u7f16\u5199\u81ea\u5df1\u7684&quot;wgetrc&quot;\u6587\u4ef6\uff1a<br \/>http-proxy&#160;=&#160;111.111.111.111:8080<br \/>ftp-proxy&#160;=&#160;111.111.111.111:8080<br \/>\u8fd9\u4e24\u884c\u7684\u542b\u4e49\u662f\uff0c\u4ee3\u7406\u670d\u52a1\u5668IP\u5730\u5740\u4e3a\uff1a111.111.111.111\uff0c\u7aef\u53e3\u53f7\u4e3a\uff1a80\u3002\u7b2c\u4e00\u884c\u6307\u5b9a<br \/>HTTP\u534f\u8bae\u6240\u4f7f\u7528\u7684\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u7b2c\u4e8c\u884c\u6307\u5b9aFTP\u534f\u8bae\u6240\u4f7f\u7528\u7684\u4ee3\u7406\u670d\u52a1\u5668\u3002<\/p>\n<h1><font size=\"6\"><span style=\"color: rgb(255, 0, 0);\">wgetrc initalization file command.<\/span><\/font><\/h1>\n<p><font size=\"4\"><span style=\"color: rgb(255, 0, 0);\"><\/span><\/font><\/p>\n<h1><a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_toc.html#TOC20\" name=\"SEC20\">Startup File<\/a><\/h1>\n<p>\n<a name=\"IDX95\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><br \/>\n<a name=\"IDX96\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><br \/>\n<a name=\"IDX97\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><br \/>\n<a name=\"IDX98\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><br \/>\n<a name=\"IDX99\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><\/p>\n<p>\nOnce you know how to change default settings of Wget through command<br \/>\nline arguments, you may wish to make some of those settings permanent.<br \/>\nYou can do that in a convenient way by creating the Wget startup<br \/>\nfile&#8212;<tt>`.wgetrc'<\/tt>.<\/p>\n<p>\nBesides <tt>`.wgetrc'<\/tt> is the &quot;main&quot; initialization file, it is<br \/>\nconvenient to have a special facility for storing passwords.  Thus Wget<br \/>\nreads and interprets the contents of <tt>`$HOME\/.netrc'<\/tt>, if it finds<br \/>\nit.  You can find <tt>`.netrc'<\/tt> format in your system manuals.<\/p>\n<p>\nWget reads <tt>`.wgetrc'<\/tt> upon startup, recognizing a limited set of<br \/>\ncommands.<\/p>\n<h2><a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_toc.html#TOC21\" name=\"SEC21\">Wgetrc Location<\/a><\/h2>\n<p>\n<a name=\"IDX100\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><br \/>\n<a name=\"IDX101\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><\/p>\n<p>\nWhen initializing, Wget will look for a <strong>global<\/strong> startup file,<br \/>\n<tt>`\/usr\/local\/etc\/wgetrc'<\/tt> by default (or some prefix other than<br \/>\n<tt>`\/usr\/local'<\/tt>, if Wget was not installed there) and read commands<br \/>\nfrom there, if it exists.<\/p>\n<p>\nThen it will look for the user&#8217;s file.  If the environmental variable<br \/>\n<code>WGETRC<\/code> is set, Wget will try to load that file.  Failing that, no<br \/>\nfurther attempts will be made.<\/p>\n<p>\nIf <code>WGETRC<\/code> is not set, Wget will try to load <tt>`$HOME\/.wgetrc'<\/tt>.<\/p>\n<p>\nThe fact that user&#8217;s settings are loaded after the system-wide ones<br \/>\nmeans that in case of collision user&#8217;s wgetrc <em>overrides<\/em> the<br \/>\nsystem-wide wgetrc (in <tt>`\/usr\/local\/etc\/wgetrc'<\/tt> by default).<br \/>\nFascist admins, away!<\/p>\n<h2><a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_toc.html#TOC22\" name=\"SEC22\">Wgetrc Syntax<\/a><\/h2>\n<p>\n<a name=\"IDX102\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><br \/>\n<a name=\"IDX103\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><\/p>\n<p>\nThe syntax of a wgetrc command is simple:<\/p>\n<pre>variable = value<br \/><\/pre>\n<p>\nThe <strong>variable<\/strong> will also be called <strong>command<\/strong>.  Valid<br \/>\n<strong>values<\/strong> are different for different commands.<\/p>\n<p>\nThe commands are case-insensitive and underscore-insensitive.  Thus<br \/>\n<samp>`DIr__PrefiX&#8217;<\/samp> is the same as <samp>`dirprefix&#8217;<\/samp>.  Empty lines, lines<br \/>\nbeginning with <samp>`#&#8217;<\/samp> and lines containing white-space only are<br \/>\ndiscarded.<\/p>\n<p>\nCommands that expect a comma-separated list will clear the list on an<br \/>\nempty command.  So, if you wish to reset the rejection list specified in<br \/>\nglobal <tt>`wgetrc'<\/tt>, you can do it with:<\/p>\n<pre>reject =<br \/><\/pre>\n<h2><a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_toc.html#TOC23\" name=\"SEC23\">Wgetrc Commands<\/a><\/h2>\n<p>\n<a name=\"IDX104\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><\/p>\n<p>\nThe complete set of commands is listed below, the letter after <samp>`=&#8217;<\/samp><br \/>\ndenoting the value the command takes. It is <samp>`on\/off&#8217;<\/samp> for <samp>`on&#8217;<\/samp><br \/>\nor <samp>`off&#8217;<\/samp> (which can also be <samp>`1&#8242;<\/samp> or <samp>`0&#8242;<\/samp>), <var>string<\/var> for<br \/>\nany non-empty string or <var>N<\/var> for a positive integer.  For example,<br \/>\nyou may specify <samp>`use_proxy = off&#8217;<\/samp> to disable use of PROXY<br \/>\nservers by default. You may use <samp>`inf&#8217;<\/samp> for infinite values, where<br \/>\nappropriate.<\/p>\n<p>\nMost of the commands have their equivalent command-line option<br \/>\n(See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_2.html#SEC2\">Invoking<\/a>), except some more obscure or rarely used ones.<\/p>\n<dl compact=\"true\">\n<dt>accept\/reject = <var>string<\/var><\/dt>\n<dt>&#160;&#160;&#160;&#160; Same as <samp>`-A&#8217;<\/samp>\/<samp>`-R&#8217;<\/samp> (See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_4.html#SEC13\">Types of Files<\/a>).<\/p>\n<\/dt>\n<dt>add_hostdir = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Enable\/disable host-prefixed file names. <samp>`-nH&#8217;<\/samp> disables it.<\/p>\n<\/dt>\n<dt>always_rest = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Enable\/disable continuation of the retrieval, the same as <samp>`-c&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>base = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Set base for relative URLs, the same as <samp>`-B&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>convert links = on\/off\n<\/dt>\n<dd>\nConvert non-relative links locally. The same as <samp>`-k&#8217;<\/samp>.<\/p>\n<\/dd>\n<dt>debug = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Debug mode, same as <samp>`-d&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>delete_after = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Delete after download, the same as <samp>`&#8211;delete-after&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>dir_mode = <var>N<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Set permission modes of created subdirectories (default is 0755).<\/p>\n<\/dt>\n<dt>dir_prefix = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Top of directory tree, the same as <samp>`-P&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>dirstruct = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Turning dirstruct on or off, the same as <samp>`-x&#8217;<\/samp> or <samp>`-nd&#8217;<\/samp>,<br \/>\nrespectively.<\/p>\n<\/dt>\n<dt>domains = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Same as <samp>`-D&#8217;<\/samp> (See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_4.html#SEC11\">Domain Acceptance<\/a>).<\/p>\n<\/dt>\n<dt>dot_bytes = <var>N<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Specify the number of bytes &quot;contained&quot; in a dot, as seen throughout<br \/>\nthe retrieval (1024 by default).  You can postfix the value with<br \/>\n<samp>`k&#8217;<\/samp> or <samp>`m&#8217;<\/samp>, representing kilobytes and megabytes,<br \/>\nrespectively.  With dot settings you can tailor the dot retrieval to<br \/>\nsuit your needs, or you can use the predefined <strong>styles<\/strong><br \/>\n(See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_2.html#SEC6\">Advanced Options<\/a>).<\/p>\n<\/dt>\n<dt>dots_in_line = <var>N<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Specify the number of dots that will be printed in each line throughout<br \/>\nthe retrieval (50 by default).<\/p>\n<\/dt>\n<dt>dot_spacing = <var>N<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Specify the number of dots in a single cluster (10 by default).<\/p>\n<\/dt>\n<dt>dot_style = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Specify the dot retrieval <strong>style<\/strong>, as with <samp>`&#8211;dot-style&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>exclude_directories = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Specify a comma-separated list of directories you wish to exclude from<br \/>\ndownload, the same as <samp>`-X&#8217;<\/samp> (See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_4.html#SEC14\">Directory-Based Limits<\/a>).<\/p>\n<\/dt>\n<dt>exclude_domains = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Same as <samp>`&#8211;exclude-domains&#8217;<\/samp> (See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_4.html#SEC11\">Domain Acceptance<\/a>).<\/p>\n<\/dt>\n<dt>follow_ftp = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Follow FTP links from HTML documents, the same as <samp>`-f&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>force_html = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; If set to on, force the input filename to be regarded as an HTML<br \/>\ndocument, the same as <samp>`-F&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>ftp_proxy = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Use <var>string<\/var> as FTP proxy, instead of the one specified in<br \/>\nenvironment.<\/p>\n<\/dt>\n<dt>glob = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Turn globbing on\/off, the same as <samp>`-g&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>header = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Define an additional header, like <samp>`&#8211;header&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>http_passwd = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Set HTTP password.<\/p>\n<\/dt>\n<dt>http_proxy = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Use <var>string<\/var> as HTTP proxy, instead of the one specified in<br \/>\nenvironment.<\/p>\n<\/dt>\n<dt>http_user = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Set HTTP user to <var>string<\/var>.<\/p>\n<\/dt>\n<dt>ignore_length = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; When set to on, ignore <code>Content-Length<\/code> header; the same as<br \/>\n<samp>`&#8211;ignore-length&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>include_directories = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Specify a comma-separated list of directories you wish to follow when<br \/>\ndownloading, the same as <samp>`-I&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>input = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Read the URLs from <var>string<\/var>, like <samp>`-i&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>kill_longer = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Consider data longer than specified in content-length header<br \/>\nas invalid (and retry getting it). The default behaviour is to save<br \/>\nas much data as there is, provided there is more than or equal<br \/>\nto the value in <code>Content-Length<\/code>.<\/p>\n<\/dt>\n<dt>logfile = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Set logfile, the same as <samp>`-o&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>login = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Your user name on the remote machine, for FTP Defaults to<br \/>\n<samp>`anonymous&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>mirror = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Turn mirroring on\/off. The same as <samp>`-m&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>noclobber = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Same as <samp>`-nc&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>no_proxy = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Use <var>string<\/var> as the comma-separated list of domains to avoid in<br \/>\nPROXY loading, instead of the<\/dt>\n<dt>&#160;&#160;&#160;&#160; one specified in environment.<\/p>\n<\/dt>\n<dt>no_parent = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Disallow retrieving outside the directory hierarchy, like<br \/>\n<samp>`&#8211;no-parent&#8217;<\/samp> (See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_4.html#SEC14\">Directory-Based Limits<\/a>).<\/p>\n<\/dt>\n<dt>output_document = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Set the output filename, the same as <samp>`-O&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>passive_ftp = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160; Set passive FTP, the same as <samp>`&#8211;passive-ftp&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>passwd = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160; Set your FTP password to <var>password<\/var>.  Without this setting, the<br \/>\npassword defaults to<\/dt>\n<dt><samp>&#160;&#160;&#160;&#160; `username@hostname.domainname&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>proxy_user = <var>string<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160;&#160; Set PROXY authentication user name to <var>string<\/var>, like<br \/>\n<samp>`&#8211;proxy-user&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>proxy_passwd = <var>string<\/var><\/dt>\n<dt><var \/> &#160; &#160; &#160; Set PROXY authentication password to <var>string<\/var>, like<br \/>\n<samp>`&#8211;proxy-passwd&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>quiet = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; Quiet mode, the same as <samp>`-q&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>quota = <var>quota<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160;&#160; Specify the download quota, which is useful to put in global<br \/>\nwgetrc. When download quota is specified, Wget will stop retrieving<br \/>\nafter the download sum has become greater than quota.  The quota can be<br \/>\nspecified in bytes (default), kbytes <samp>`k&#8217;<\/samp> appended) or mbytes<br \/>\n(<samp>`m&#8217;<\/samp> appended).  Thus <samp>`quota = 5m&#8217;<\/samp> will set the quota to 5<br \/>\nmbytes. Note that the user&#8217;s startup file overrides system settings.<\/dt>\n<dd><\/dd>\n<dt>reclevel = <var>N<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160;&#160; Recursion level, the same as <samp>`-l&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>recursive = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; Recursive on\/off, the same as <samp>`-r&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>relative_only = on\/off\n<\/dt>\n<dd>&#160;Follow only relative links, the same as <samp>`-L&#8217;<\/samp> (See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_4.html#SEC9\">Relative Links<\/a>).<\/p>\n<\/dd>\n<dt>remove_listing = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; If set to on, remove FTP listings downloaded by Wget.  Setting it<br \/>\nto off is the same as <samp>`-nr&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>retr_symlinks = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; When set to on, retrieve symbolic links as if they were plain files; the<br \/>\nsame as <samp>`&#8211;retr-symlinks&#8217;<\/samp>.<\/dt>\n<dd><\/dd>\n<dt>robots = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; Use (or not) <tt>`\/robots.txt'<\/tt> file (See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_9.html#SEC36\">Robots<\/a>).  Be sure to know<br \/>\nwhat you are doing before changing the default (which is <samp>`on&#8217;<\/samp>).<\/dt>\n<dd><\/dd>\n<dt>server_response = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; Choose whether or not to print the HTTP and FTP server<br \/>\nresponses, the same as <samp>`-S&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>simple_host_check = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; Same as <samp>`-nh&#8217;<\/samp> (See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_4.html#SEC10\">Host Checking<\/a>).<\/p>\n<\/dt>\n<dt>span_hosts = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; Same as <samp>`-H&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>timeout = <var>N<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160;&#160; Set timeout value, the same as <samp>`-T&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>timestamping = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; Turn timestamping on\/off. The same as <samp>`-N&#8217;<\/samp> (See section <a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_5.html#SEC16\">Time-Stamping<\/a>).<\/p>\n<\/dt>\n<dt>tries = <var>N<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160;&#160; Set number of retries per URL, the same as <samp>`-t&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>use_proxy = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; Turn PROXY support on\/off. The same as <samp>`-Y&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>verbose = on\/off<\/dt>\n<dt>&#160;&#160;&#160;&#160;&#160; Turn verbose on\/off, the same as <samp>`-v&#8217;<\/samp>\/<samp>`-nv&#8217;<\/samp>.<\/p>\n<\/dt>\n<dt>wait = <var>N<\/var><\/dt>\n<dt><var \/>&#160;&#160;&#160;&#160;&#160; Wait <var>N<\/var> seconds between retrievals, the same as <samp>`-w&#8217;<\/samp>.\n<\/dt>\n<\/dl>\n<h2><a href=\"http:\/\/www.lns.cornell.edu\/public\/COMP\/info\/wget\/wget_toc.html#TOC24\" name=\"SEC24\">Sample Wgetrc<\/a><\/h2>\n<p>\n<a name=\"IDX105\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.lns.cornell.edu\/public\/icons\/invisible.xbm\" \/><\/a><\/p>\n<p>\nThis is the sample initialization file, as given in the distribution.<br \/>\nIt is divided in two section&#8211;one for global usage (suitable for global<br \/>\nstartup file), and one for local usage (suitable for<br \/>\n<tt>`$HOME\/.wgetrc'<\/tt>).  Be careful about the things you change.<\/p>\n<p>\nNote that all the lines are commented out.  For any line to have effect,<br \/>\nyou must remove the <samp>`#&#8217;<\/samp> prefix at the beginning of line.<\/p>\n<pre>###<br \/>### Sample Wget initialization file .wgetrc<br \/>###<br \/><br \/>## You can use this file to change the default behaviour of wget or to<br \/>## avoid having to type many many command-line options. This file does<br \/>## not contain a comprehensive list of commands -- look at the manual<br \/>## to find out what you can put into this file.<br \/>## <br \/>## Wget initialization file can reside in \/usr\/local\/etc\/wgetrc<br \/>## (global, for all users) or $HOME\/.wgetrc (for a single user).<br \/>##<br \/>## To use any of the settings in this file, you will have to uncomment<br \/>## them (and probably change them).<br \/><br \/>##<br \/>## Global settings (useful for setting up in \/usr\/local\/etc\/wgetrc).<br \/>## Think well before you change them, since they may reduce wget's<br \/>## functionality, and make it behave contrary to the documentation:<br \/>##<br \/><br \/># You can set retrieve quota for beginners by specifying a value<br \/># optionally followed by 'K' (kilobytes) or 'M' (megabytes).  The<br \/># default quota is unlimited.<br \/>#quota = inf<br \/><br \/># You can lower (or raise) the default number of retries when<br \/># downloading a file (default is 20).<br \/>#tries = 20<br \/><br \/># Lowering the maximum depth of the recursive retrieval is handy to<br \/># prevent newbies from going too &quot;deep&quot; when they unwittingly start<br \/># the recursive retrieval.  The default is 5.<br \/>#reclevel = 5<br \/><br \/># Many sites are behind firewalls that do not allow initiation of<br \/># connections from the outside.  On these sites you have to use the<br \/># `passive' feature of FTP.  If you are behind such a firewall, you<br \/># can turn this on to make Wget use passive FTP by default.<br \/>#passive_ftp = off<br \/><br \/>##<br \/>## Local settings (for a user to set in his $HOME\/.wgetrc).  It is<br \/>## *highly* undesirable to put these settings in the global file, since<br \/>## they are potentially dangerous to &quot;normal&quot; users.<br \/>##<br \/>## Even when setting up your own ~\/.wgetrc, you should know what you<br \/>## are doing before doing so.<br \/>##<br \/><br \/># Set this to on to use timestamping by default:<br \/>#timestamping = off<br \/><br \/># It is a good idea to make Wget send your email address in a `From:'<br \/># header with your request (so that server administrators can contact<br \/># you in case of errors).  Wget does *not* send `From:' by default.<br \/>#header = From: Your Name &lt;username@site.domain&gt;<br \/><br \/># You can set up other headers, like Accept-Language.  Accept-Language<br \/># is *not* sent by default.<br \/>#header = Accept-Language: en<br \/><br \/># You can set the default proxy for Wget to use.  It will override the<br \/># value in the environment.<br \/>#http_proxy = http:\/\/proxy.yoyodyne.com:18023\/<br \/><br \/># If you do not want to use proxy at all, set this to off.<br \/>#use_proxy = on<br \/><br \/># You can customize the retrieval outlook.  Valid options are default,<br \/># binary, mega and micro.<br \/>#dot_style = default<br \/><br \/># Setting this to off makes Wget not download \/robots.txt.  Be sure to<br \/># know *exactly* what \/robots.txt is and how it is used before changing<br \/># the default!<br \/>#robots = on<br \/><br \/># It can be useful to make Wget wait between connections.  Set this to<br \/># the number of seconds you want Wget to wait.<br \/>#wait = 0<br \/><br \/># You can force creating directory structure, even if a single is being<br \/># retrieved, by setting this to on.<br \/>#dirstruct = off<br \/><br \/># You can turn on recursive retrieving by default (don't do this if<br \/># you are not sure you know what it means) by setting this to on.<br \/>#recursive = off<br \/><br \/># To have Wget follow FTP links from HTML files by default, set this<br \/># to on:<br \/>#follow_ftp = off<br \/><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/www.yesybl.com\/?p=54\" rel=\"bookmark\" title=\"Permalink to linux\u73af\u5883\u4e0b\u7684&#8221;\u8682\u8681&#8221;-wget\u4f7f\u7528\u7b80\u4ecb\"><p>wget\u7684\u4f7f\u7528\u5f62\u5f0f\u662f\uff1awget&#160;[\u53c2\u6570\u5217\u8868]&#160;URL\u9996\u5148\u6765\u4ecb\u7ecd\u4e00\u4e0bwget\u7684\u4e3b\u8981\u53c2\u6570\uff1a\u30fb&#160;-b\uff1a\u8ba9wget\u5728\u540e\u53f0\u8fd0\u884c\uff0c\u8bb0\u5f55\u6587\u4ef6\u5199\u5728\u5f53\u524d\u76ee\u5f55\u4e0b&quot;wget-log&quot;\u6587\u4ef6\u4e2d\uff1b\u30fb&#160;-t&#160;[nuber&#160;of&#160;times]\uff1a\u5c1d\u8bd5\u6b21\u6570\uff0c\u5f53wget\u65e0\u6cd5\u4e0e\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\u65f6\uff0c\u5c1d\u8bd5\u8fde\u63a5\u591a\u5c11\u6b21\u3002\u6bd4\u5982&quot;-t120&quot;\u8868\u793a\u5c1d\u8bd5120\u6b21\u3002\u5f53\u8fd9\u4e00\u9879\u4e3a&quot;0&quot;\u7684\u65f6\u5019\uff0c\u6307\u5b9a\u5c1d\u8bd5\u65e0\u7a77\u591a\u6b21\u76f4\u5230\u8fde\u63a5\u6210\u529f\u4e3a\u6b62\uff0c\u8fd9\u4e2a\u8bbe\u7f6e\u975e\u5e38\u6709\u7528\uff0c\u5f53\u5bf9\u65b9\u670d\u52a1\u5668\u7a81\u7136\u5173\u673a\u6216\u8005\u7f51\u7edc\u7a81\u7136\u4e2d\u65ad\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u5728\u6062\u590d\u6b63\u5e38\u540e\u7ee7\u7eed\u4e0b\u8f7d\u6ca1\u6709\u4f20\u5b8c\u7684\u6587\u4ef6\uff1b\u30fb&#160;-c\uff1a\u65ad\u70b9\u7eed\u4f20\uff0c\u8fd9\u4e5f\u662f\u4e2a\u975e\u5e38\u6709\u7528\u7684\u8bbe\u7f6e\uff0c\u7279\u522b\u5f53\u4e0b\u8f7d\u6bd4\u8f83\u5927\u7684\u6587\u4ef6\u7684\u65f6\u5019\uff0c\u5982\u679c\u4e2d\u9014\u610f\u5916\u4e2d\u65ad\uff0c\u90a3\u4e48\u8fde\u63a5\u6062\u590d\u7684\u65f6\u5019\u4f1a\u4ece\u4e0a\u6b21\u6ca1\u4f20\u5b8c\u7684\u5730\u65b9\u63a5\u7740\u4f20\uff0c\u800c\u4e0d\u662f\u53c8\u4ece\u5934\u5f00\u59cb\uff0c\u4f7f\u7528\u8fd9\u4e00\u9879\u9700\u8981\u8fdc\u7a0b\u670d\u52a1\u5668\u4e5f\u652f\u6301\u65ad\u70b9\u7eed\u4f20\uff0c\u4e00\u822c\u6765\u8bb2\uff0c\u57fa\u4e8eUNIX\/Linux\u7684Web\/FTP\u670d\u52a1\u5668\u90fd\u652f\u6301\u65ad\u70b9\u7eed\u4f20\uff1b\u30fb&#160;-T&#160;[number&#160;of&#160;seconds]\uff1a\u8d85\u65f6\u65f6\u95f4\uff0c\u6307\u5b9a\u591a\u957f\u65f6\u95f4\u8fdc\u7a0b\u670d\u52a1\u5668\u6ca1\u6709\u54cd\u5e94\u5c31\u4e2d\u65ad\u8fde\u63a5\uff0c\u5f00\u59cb\u4e0b\u4e00\u6b21\u5c1d\u8bd5\u3002\u6bd4\u5982&quot;-T120&quot;\u8868\u793a\u5982\u679c120\u79d2\u4ee5\u540e\u8fdc\u7a0b\u670d\u52a1\u5668\u6ca1\u6709\u53d1\u8fc7\u6765\u6570\u636e\uff0c\u5c31\u91cd\u65b0\u5c1d\u8bd5\u8fde\u63a5\u3002\u5982\u679c\u7f51\u7edc\u901f\u5ea6\u6bd4\u8f83\u5feb\uff0c\u8fd9\u4e2a\u65f6\u95f4\u53ef\u4ee5\u8bbe\u7f6e\u7684\u77ed\u4e9b\uff0c\u76f8\u53cd\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u7684\u957f\u4e00\u4e9b\uff0c\u4e00\u822c\u6700\u591a\u4e0d\u8d85\u8fc7900\uff0c\u901a\u5e38\u4e5f\u4e0d\u5c11\u4e8e60\uff0c\u4e00\u822c\u8bbe\u7f6e\u5728120\u5de6\u53f3\u6bd4\u8f83\u5408\u9002\uff1b\u30fb&#160;-w&#160;[number&#160;of&#160;seconds]\uff1a\u5728\u4e24\u6b21\u5c1d\u8bd5\u4e4b\u95f4\u7b49\u5f85\u591a\u5c11\u79d2\uff0c\u6bd4\u5982&quot;-w&#160;100&quot;\u8868\u793a\u4e24\u6b21\u5c1d\u8bd5\u4e4b\u95f4\u7b49\u5f85100\u79d2\uff1b\u30fb&#160;-Y&#160;on\/off\uff1a\u901a\u8fc7\uff0f\u4e0d\u901a\u8fc7\u4ee3\u7406\u670d\u52a1\u5668\u8fdb\u884c\u8fde\u63a5\uff1b\u30fb&#160;-Q&#160;[byetes]\uff1a\u9650\u5236\u4e0b\u8f7d\u6587\u4ef6\u7684\u603b\u5927\u5c0f\u6700\u591a\u4e0d\u80fd\u8d85\u8fc7\u591a\u5c11\uff0c\u6bd4\u5982&quot;-Q2k&quot;\u8868\u793a\u4e0d\u80fd\u8d85\u8fc72K\u5b57\u8282\uff0c&quot;-Q3m&quot;\u8868\u793a\u6700\u591a\u4e0d\u80fd\u8d85\u8fc73M\u5b57\u8282\uff0c\u5982\u679c\u6570\u5b57\u540e\u9762\u4ec0\u4e48\u90fd\u4e0d\u52a0\uff0c\u5c31\u8868\u793a\u662f\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\uff0c\u6bd4\u5982&quot;-Q200&quot;\u8868\u793a\u6700\u591a\u4e0d\u80fd\u8d85\u8fc7200\u5b57\u8282\uff1b\u30fb&#160;-nd\uff1a\u4e0d\u4e0b\u8f7d\u76ee\u5f55\u7ed3\u6784\uff0c\u628a\u4ece\u670d\u52a1\u5668\u6240\u6709\u6307\u5b9a\u76ee\u5f55\u4e0b\u8f7d\u7684\u6587\u4ef6\u90fd\u5806\u5230\u5f53\u524d\u76ee\u5f55\u91cc\uff1b\u30fb&#160;-x\uff1a\u4e0e&quot;-nd&quot;\u8bbe\u7f6e\u521a\u597d\u76f8\u53cd\uff0c\u521b\u5efa\u5b8c\u6574\u7684\u76ee\u5f55\u7ed3\u6784\uff0c\u4f8b\u5982&quot;wget&#160;-ndhttp:\/\/www.gnu.org&quot;\u5c06\u521b\u5efa\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa&quot;www.gnu.org&quot;\u5b50\u76ee\u5f55\uff0c\u7136\u540e\u6309\u7167\u670d\u52a1\u5668\u5b9e\u9645\u7684\u76ee\u5f55\u7ed3\u6784\u4e00\u7ea7\u4e00\u7ea7\u5efa\u4e0b\u53bb\uff0c\u76f4\u5230\u6240\u6709\u7684\u6587\u4ef6\u90fd\u4f20\u5b8c\u4e3a\u6b62\uff1b\u30fb&#160;-nH\uff1a\u4e0d\u521b\u5efa\u4ee5\u76ee\u6807\u4e3b\u673a\u57df\u540d\u4e3a\u76ee\u5f55\u540d\u7684\u76ee\u5f55\uff0c\u5c06\u76ee\u6807\u4e3b\u673a\u7684\u76ee\u5f55\u7ed3\u6784\u76f4\u63a5\u4e0b\u5230\u5f53\u524d\u76ee\u5f55\u4e0b\uff1b\u30fb&#160;&#8211;http-user=username\u30fb&#160;&#8211;http-passwd=password\uff1a\u5982\u679cWeb\u670d\u52a1\u5668\u9700\u8981\u6307\u5b9a\u7528\u6237\u540d\u548c\u53e3\u4ee4\uff0c\u7528\u8fd9\u4e24\u9879\u6765\u8bbe\u5b9a\uff1b\u30fb&#160;&#8211;proxy-user=username\u30fb&#160;&#8211;proxy-passwd=password\uff1a\u5982\u679c\u4ee3\u7406\u670d\u52a1\u5668\u9700\u8981\u8f93\u5165\u7528\u6237\u540d\u548c\u53e3\u4ee4\uff0c\u4f7f\u7528\u8fd9\u4e24\u4e2a\u9009\u9879\uff1b\u30fb&#160;-r\uff1a\u5728\u672c\u673a\u5efa\u7acb\u670d\u52a1\u5668\u7aef\u76ee\u5f55\u7ed3\u6784\uff1b\u30fb&#160;-l&#160;[depth]\uff1a\u4e0b\u8f7d\u8fdc\u7a0b\u670d\u52a1\u5668\u76ee\u5f55\u7ed3\u6784\u7684\u6df1\u5ea6\uff0c\u4f8b\u5982&quot;-l&#160;5&quot;\u4e0b\u8f7d\u76ee\u5f55\u6df1\u5ea6\u5c0f\u4e8e\u6216\u8005\u7b49\u4e8e5\u4ee5\u5185\u7684\u76ee\u5f55\u7ed3\u6784\u6216\u8005\u6587\u4ef6\uff1b\u30fb&#160;-m\uff1a\u505a\u7ad9\u70b9\u955c\u50cf\u65f6\u7684\u9009\u9879\uff0c\u5982\u679c\u4f60\u60f3\u505a\u4e00\u4e2a\u7ad9\u70b9\u7684\u955c\u50cf\uff0c\u4f7f\u7528\u8fd9\u4e2a\u9009\u9879\uff0c\u5b83\u5c06\u81ea\u52a8\u8bbe\u5b9a\u5176\u4ed6\u5408\u9002\u7684\u9009\u9879\u4ee5\u4fbf\u4e8e\u7ad9\u70b9\u955c\u50cf\uff1b\u30fb&#160;-np\uff1a\u53ea\u4e0b\u8f7d\u76ee\u6807\u7ad9\u70b9\u6307\u5b9a\u76ee\u5f55\u53ca\u5176\u5b50\u76ee\u5f55\u7684\u5185\u5bb9\u3002\u8fd9\u4e5f\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u9009\u9879\uff0c\u6211\u4eec\u5047\u8bbe\u67d0\u4e2a\u4eba\u7684\u4e2a\u4eba\u4e3b\u9875\u91cc\u9762\u6709\u4e00\u4e2a\u6307\u5411\u8fd9\u4e2a\u7ad9\u70b9\u5176\u4ed6\u4eba\u4e2a\u4eba\u4e3b\u9875\u7684\u8fde\u63a5\uff0c\u800c\u6211\u4eec\u53ea\u60f3\u4e0b\u8f7d\u8fd9\u4e2a\u4eba\u7684\u4e2a\u4eba\u4e3b\u9875\uff0c\u5982\u679c\u4e0d\u8bbe\u7f6e\u8fd9\u4e2a\u9009\u9879\uff0c\u751a\u81f3&#8211;\u6709\u53ef\u80fd\u628a\u6574\u4e2a\u7ad9\u70b9\u7ed9\u6293\u4e0b\u6765\uff0c\u8fd9\u663e\u7136\u662f\u6211\u4eec\u901a\u5e38\u4e0d\u5e0c\u671b\u7684\uff1b\u00fc&#160;\u5982\u4f55\u8bbe\u5b9awget\u6240\u4f7f\u7528\u7684\u4ee3\u7406\u670d\u52a1\u5668wget\u53ef\u4ee5\u4f7f\u7528\u7528\u6237\u8bbe\u7f6e\u6587\u4ef6&quot;.wgetrc&quot;\u6765\u8bfb\u53d6\u5f88\u591a\u8bbe\u7f6e\uff0c\u6211\u4eec\u8fd9\u91cc\u4e3b\u8981\u5229\u7528\u8fd9\u4e2a\u6587\u4ef6\u6765\u662f\u8bbe\u7f6e\u4ee3\u7406\u670d\u52a1\u5668\u3002\u4f7f\u7528\u8005\u7528\u4ec0\u4e48\u7528\u6237\u767b\u5f55\uff0c\u90a3\u4e48\u4ec0\u4e48\u7528\u6237\u4e3b\u76ee\u5f55\u4e0b\u7684&quot;.wgetrc&quot;\u6587\u4ef6\u5c31\u8d77\u4f5c\u7528\u3002\u4f8b\u5982\uff0c&quot;root&quot;\u7528\u6237\u5982\u679c\u60f3\u4f7f\u7528&quot;.wgetrc&quot;\u6765\u8bbe\u7f6e\u4ee3\u7406\u670d\u52a1\u5668\uff0c&quot;\/root\/.wgert&quot;\u5c31\u8d77\u4f5c\u7528\uff0c\u4e0b\u9762\u7ed9\u51fa\u4e00\u4e2a&quot;.wgetrc&quot;\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u8bfb\u8005\u53ef\u4ee5\u53c2\u7167\u8fd9\u4e2a\u4f8b\u5b50\u6765\u7f16\u5199\u81ea\u5df1\u7684&quot;wgetrc&quot;\u6587\u4ef6\uff1ahttp-proxy&#160;=&#160;111.111.111.111:8080ftp-proxy&#160;=&#160;111.111.111.111:8080\u8fd9\u4e24\u884c\u7684\u542b\u4e49\u662f\uff0c\u4ee3\u7406\u670d\u52a1\u5668IP\u5730\u5740\u4e3a\uff1a111.111.111.111\uff0c\u7aef\u53e3\u53f7\u4e3a\uff1a80\u3002\u7b2c\u4e00\u884c\u6307\u5b9aHTTP\u534f\u8bae\u6240\u4f7f\u7528\u7684\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u7b2c\u4e8c\u884c\u6307\u5b9aFTP\u534f\u8bae\u6240\u4f7f\u7528\u7684\u4ee3\u7406\u670d\u52a1\u5668\u3002 wgetrc initalization file command. Startup File Once you know how to change default settings of Wget through command line arguments, you may wish to make some of those settings permanent. You can do that in a convenient way by creating the Wget startup file&#8212;`.wgetrc&#8217;. Besides `.wgetrc&#8217; is the &quot;main&quot; initialization file, it is convenient [&hellip;]<\/p>\n<\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pa4z28-S","_links":{"self":[{"href":"https:\/\/www.yesybl.com\/index.php?rest_route=\/wp\/v2\/posts\/54"}],"collection":[{"href":"https:\/\/www.yesybl.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yesybl.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yesybl.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yesybl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":0,"href":"https:\/\/www.yesybl.com\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yesybl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yesybl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yesybl.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}