{"id":791,"date":"2012-02-02T16:00:13","date_gmt":"2012-02-02T21:00:13","guid":{"rendered":"http:\/\/scripts.mit.edu\/~zong\/wpress\/?p=791"},"modified":"2012-02-02T16:01:55","modified_gmt":"2012-02-02T21:01:55","slug":"791","status":"publish","type":"post","link":"https:\/\/blog.yhuang.org\/?p=791","title":{"rendered":"wget"},"content":{"rendered":"<p><a href=\"http:\/\/www.editcorp.com\/Personal\/Lars_Appel\/wget\/wget_7.html\">This<\/a> is a useful reference. It seems wget can do recursive downloads while cURL cannot:<\/p>\n<blockquote><p>You want to download all the GIFs from an HTTP directory. `wget http:\/\/host\/dir\/*.gif&#8217; doesn&#8217;t work, since HTTP retrieval does not support globbing. In that case, use:<\/p>\n<p>wget -r -l1 &#8211;no-parent -A.gif http:\/\/host\/dir\/<\/p>\n<p>It is a bit of a kludge, but it works.<\/p>\n<p>`-r -l1&#8242; means to retrieve recursively (See section Recursive Retrieval), with maximum depth of 1.<br \/>\n`&#8211;no-parent&#8217; means that references to the parent directory are ignored (See section Directory-Based Limits), and<br \/>\n`-A.gif&#8217; means to download only the GIF files. `-A &#8220;*.gif&#8221;&#8216; would have worked too.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>This is a useful reference. It seems wget can do recursive downloads while cURL cannot: You want to download all the GIFs from an HTTP directory. `wget http:\/\/host\/dir\/*.gif&#8217; doesn&#8217;t work, since HTTP retrieval does not support globbing. In that case, use: wget -r -l1 &#8211;no-parent -A.gif http:\/\/host\/dir\/ It is a bit of a kludge, but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2618,2616,2615,2612,2614,2613,2623,2621],"class_list":["post-791","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-download","tag-gifs","tag-http","tag-parent-directory","tag-recursive","tag-recursive-retrieval","tag-retrieval","tag-wget"],"_links":{"self":[{"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/posts\/791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=791"}],"version-history":[{"count":0,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/posts\/791\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}