{"id":1566,"date":"2007-09-22T11:32:55","date_gmt":"2007-09-22T15:32:55","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/2007\/09\/22\/resuming-adc-downloads\/"},"modified":"2007-09-22T11:32:57","modified_gmt":"2007-09-22T15:32:57","slug":"resuming-adc-downloads","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2007\/09\/22\/resuming-adc-downloads\/","title":{"rendered":"Resuming ADC Downloads"},"content":{"rendered":"<p>Downloading from Apple&rsquo;s developer seeding site takes a long time with a DSL connection, and when using current versions of Safari and Firefox an interrupted download means that you have to start over. It&rsquo;s virtually impossible for my download to go uninterrupted long enough to get a whole DVD-sized file. Fortunately, Mac OS X includes a built-in command-line tool called <tt>curl<\/tt> that can automatically retry and resume downloads. Normally you can invoke it using <tt>curl -O 'URL'<\/tt> to download <tt>URL<\/tt> into the current directory. It&rsquo;s slightly more complicated if you want handle cookie-authorization and URL redirection:<\/p>\n<ol>\n<li>Log in using your browser and copy the file&rsquo;s URL.<\/li>\n<li>Use <tt>curl 'URL' -D FILE<\/tt> to dump the headers into <tt>FILE<\/tt>.<\/li>\n<li>Open the file and note the cookie (<tt>set-cookie: NAME=VALUE<\/tt>) and new URL (<tt>location: NEWURL<\/tt>).<\/li>\n<li>Now download the file using <tt>curl -O 'NEWURL' -b 'NAME=VALUE' --retry 100 -C -<\/tt>. This will retry and auto-resume up to 100 times.<\/li>\n<li>You can also add <tt>--limit-rate 100K<\/tt> to limit the amount of bandwidth that <tt>curl<\/tt> uses if you want to reserve some of your connection for other use.<\/li>\n<\/ol>","protected":false},"excerpt":{"rendered":"<p>Downloading from Apple&rsquo;s developer seeding site takes a long time with a DSL connection, and when using current versions of Safari and Firefox an interrupted download means that you have to start over. It&rsquo;s virtually impossible for my download to go uninterrupted long enough to get a whole DVD-sized file. Fortunately, Mac OS X includes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-1566","post","type-post","status-publish","format-standard","hentry","category-technology"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/1566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=1566"}],"version-history":[{"count":0,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/1566\/revisions"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=1566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=1566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=1566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}