{"id":268622,"date":"2023-03-31T04:08:08","date_gmt":"2023-03-30T20:08:08","guid":{"rendered":"https:\/\/lrxjmw.cn\/qsazlzdwxzgk.html"},"modified":"2023-03-31T04:08:08","modified_gmt":"2023-03-30T20:08:08","slug":"qsazlzdwxzgk","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/qsazlzdwxzgk.html","title":{"rendered":"\u8f7b\u677e\u5b89\u88c5Linux\u4e2d\u7684wget\uff0c\u4e0b\u8f7d\u66f4\u5feb\u66f4\u7a33\u5b9a"},"content":{"rendered":"

Linux<\/a>\u7cfb\u7edf<\/a>\u4e0b\uff0cwget\u662f\u4e00\u6b3e\u975e\u5e38\u5b9e\u7528\u7684\u4e0b\u8f7d\u5de5\u5177\u3002\u5b83\u53ef\u4ee5\u5728\u4e0d\u9700\u8981\u4ea4\u4e92\u7684\u60c5\u51b5\u4e0blinux wget\u5b89\u88c5<\/strong>\uff0c\u4ece\u6307\u5b9a\u7684URL\u5730\u5740\u4e2d\u4e0b\u8f7d\u6587\u4ef6\uff0c\u5e76\u652f\u6301\u65ad\u70b9\u7eed\u4f20\u7b49\u529f\u80fd\u3002\u4eca\u5929\uff0c\u6211\u4eec\u5c31\u6765\u8be6\u7ec6\u4e86\u89e3\u4e00\u4e0bLinux wget\u5b89\u88c5\u53ca\u4f7f\u7528\u65b9\u6cd5\u3002<\/p>\n

1.\u5b89\u88c5wget<\/p>\n

\u5728\u5927\u591a\u6570Linux\u53d1\u884c\u7248\u4e2d\uff0cwget\u90fd\u5df2\u7ecf\u9884\u88c5\u4e86\u3002\u5982\u679c\u4f60\u7684\u7cfb\u7edf\u6ca1\u6709\u5b89\u88c5wgetlinux\u5f00\u53d1\u57f9\u8bad\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4<\/a>\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n

\n

sh\nsudo apt-get update && sudo apt-get install wget\n<\/pre>\n<\/p>\n

2.\u4e0b\u8f7d\u6587\u4ef6<\/p>\n

\u4f7f\u7528wget\u4e0b\u8f7d\u6587\u4ef6\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n

\n

sh\nwget [URL]\n<\/pre>\n<\/p>\n

\u5176\u4e2d\uff0c[URL]\u4e3a\u8981\u4e0b\u8f7d\u7684\u6587\u4ef6\u5730\u5740\u3002\u5982\u679c\u9700\u8981\u5c06\u6587\u4ef6\u4fdd\u5b58\u5230\u6307\u5b9a\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u52a0\u4e0a-O\u53c2\u6570\uff1a<\/p>\n

\n

sh\nwget [URL]-O[filename]\n<\/pre>\n<\/p>\n

3.\u65ad\u70b9\u7eed\u4f20<\/p>\n

\u5f53\u6211\u4eec\u4e0b\u8f7d\u8f83\u5927\u7684\u6587\u4ef6\u65f6\uff0c\u5f80\u5f80\u9700\u8981\u8017\u8d39\u8f83\u957f\u65f6\u95f4\u3002\u5982\u679c\u56e0\u4e3a\u67d0\u4e9b\u539f\u56e0\u4e2d\u65ad\u4e86\u4e0b\u8f7d\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528wget\u63d0\u4f9b\u7684\u65ad\u70b9\u7eed\u4f20\u529f\u80fd\uff0c\u5728\u4e0b\u8f7d\u65f6\u4ece\u4e0a\u6b21\u4e2d\u65ad\u5904\u7ee7\u7eed\u4e0b\u8f7d\u3002<\/p>\n

\n

sh\nwget -c[URL]\n<\/pre>\n<\/p>\n

4.\u540e\u53f0\u4e0b\u8f7d<\/p>\n

\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u5728\u540e\u53f0\u8fdb\u884c\u6587\u4ef6\u4e0b\u8f7d\u64cd\u4f5c\uff0c\u8fd9\u65f6\u5019\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

sh\nwget -b[URL]\n<\/pre>\n<\/p>\n

5.\u9650\u901f\u4e0b\u8f7d<\/p>\n

\u5982\u679c\u6211\u4eec\u9700\u8981\u63a7\u5236\u4e0b\u8f7d\u901f\u5ea6\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u9650\u901f\uff1a<\/p>\n

\n

sh\nwget --limit-rate=[speed][URL]\n<\/pre>\n<\/p>\n

\u5176\u4e2dlinux wget\u5b89\u88c5<\/strong>\uff0c[speed]\u4e3a\u4e0b\u8f7d\u901f\u5ea6\uff0c\u5355\u4f4d\u4e3aKB\/s\u3002<\/p>\n

6.\u4e0b\u8f7d\u591a\u4e2a\u6587\u4ef6<\/p>\n

\u5982\u679c\u9700\u8981\u4e0b\u8f7d\u591a\u4e2a\u6587\u4ef6\uff0c\u53ef\u4ee5\u5c06URL\u5730\u5740\u5199\u5165\u4e00\u4e2a\u6587\u4ef6\u4e2dlinux\u7cfb\u7edf\uff0c\u7136\u540e\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u6279\u91cf\u4e0b\u8f7d\uff1a<\/p>\n

\n

sh\nwget -i[file]\n<\/pre>\n<\/p>\n

\u5176\u4e2d\uff0c[file]\u4e3a\u5b58\u653eURL\u5730\u5740\u7684\u6587\u4ef6\u540d\u3002<\/p>\n

7.\u4f7f\u7528\u4ee3\u7406\u670d\u52a1\u5668<\/p>\n

\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u4f7f\u7528\u4ee3\u7406\u670d\u52a1\u5668\u8fdb\u884c\u4e0b\u8f7d\u64cd\u4f5c\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6307\u5b9a\u4ee3\u7406\u670d\u52a1\u5668\uff1a<\/p>\n

\n

sh\nwget -e use_proxy=yes -e http_proxy=[proxy_server]:[port][URL]\n<\/pre>\n<\/p>\n

\u5176\u4e2d\uff0c[proxy_server]\u4e3a\u4ee3\u7406\u670d\u52a1\u5668\u5730\u5740\uff0c[port]\u4e3a\u4ee3\u7406\u670d\u52a1\u5668\u7aef\u53e3\u53f7\u3002<\/p>\n

8.\u4e0b\u8f7d\u9650\u5236<\/p>\n

\u6709\u4e9b\u7f51\u7ad9\u53ef\u80fd\u4f1a\u5bf9\u7528\u6237\u8fdb\u884c\u4e0b\u8f7d\u9650\u5236\uff0c\u5982\u9700\u7ed5\u8fc7\u8fd9\u4e9b\u9650\u5236\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

sh\nwget --user-agent="[user_agent]"[URL]\n<\/pre>\n<\/p>\n

\u5176\u4e2d\uff0c[user_agent]\u4e3a\u7528\u6237\u4ee3\u7406\u5b57\u7b26\u4e32\u3002<\/p>\n

9.\u4e0b\u8f7d\u5b8c\u6574\u7f51\u7ad9<\/p>\n

\u5982\u679c\u9700\u8981\u4e0b\u8f7d\u6574\u4e2a\u7f51\u7ad9\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

sh\nwget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows [URL]\n<\/pre>\n<\/p>\n

\u4ee5\u4e0a\u5c31\u662f\u5173\u4e8eLinux wget\u5b89\u88c5\u53ca\u4f7f\u7528\u65b9\u6cd5\u7684\u8be6\u7ec6\u4ecb\u7ecd\u3002\u5e0c\u671b\u672c\u6587\u80fd\u591f\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Linux\u7cfb\u7edf\u4e0b\uff0cwget\u662f\u4e00\u6b3e\u975e\u5e38\u5b9e\u7528\u7684\u4e0b\u8f7d\u5de5\u5177\u3002wget\u5b89\u88c5\u53ca\u4f7f\u7528\u65b9\u6cd5\u3002\u5b89\u88c5wget\u5728\u5927\u591a\u6570Linux\u53d1\u884c\u7248\u4e2d\uff0cwget\u90fd\u5df2\u7ecf\u9884\u88c5\u4e86\u3002\u5982\u679c\u4f60\u7684\u7cfb\u7edf\u6ca1\u6709\u5b89\u88c5wget\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a\u4f7f\u7528wget\u4e0b\u8f7d\u6587\u4ef6\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\uff1a\u5982\u679c\u9700\u8981\u4e0b\u8f7d\u6574\u4e2a\u7f51\u7ad9\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1awget\u5b89\u88c5\u53ca\u4f7f\u7528\u65b9\u6cd5\u7684\u8be6\u7ec6\u4ecb\u7ecd\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-268622","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/268622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=268622"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/268622\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=268622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=268622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=268622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}