Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use wget to download the Raspbian image for the Raspberry Pi (http://downloads.raspberrypi.org/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip).

It starts downloading fine but then finished after a second without error but clearly not finished and leaves a tiny file instead of the full one:

kemra102@iacon:~/Downloads$ wget http://downloads.raspberrypi.org/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip
--2012-08-13 20:26:57--  http://downloads.raspberrypi.org/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip
Resolving downloads.raspberrypi.org (downloads.raspberrypi.org)...
Connecting to downloads.raspberrypi.org (downloads.raspberrypi.org)||:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.raspberrypi.org/download.php?file=/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip [following]
--2012-08-13 20:26:57--  http://downloads.raspberrypi.org/download.php?file=/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip
Reusing existing connection to downloads.raspberrypi.org:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `2012-07-15-wheezy-raspbian.zip'

    [ <=>                                                                                                                                             ] 17,012      --.-K/s   in 0.04s   

2012-08-13 20:26:57 (373 KB/s) - `2012-07-15-wheezy-raspbian.zip' saved [17012]

kemra102@iacon:~/Downloads$ ls -l 2012-07-15-wheezy-raspbian.zip 
-rw-rw-r-- 1 kemra102 kemra102 17012 Aug 13 20:26 2012-07-15-wheezy-raspbian.zip

I cannot find anything anywhere on the net to indicate what could possible be causing the issue.

share|improve this question
up vote 4 down vote accepted

Try looking at the file you've received:

$ wget http://downloads.raspberrypi.org/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip
-- snip --
2012-08-13 16:31:23 (9.78 MB/s) - `2012-07-15-wheezy-raspbian.zip' saved [6501]

$ file 2012-07-15-wheezy-raspbian.zip 
2012-07-15-wheezy-raspbian.zip: HTML document text

We can see that we're actually receiving an HTML document. This is further evidenced by the line in your output: Length: unspecified [text/html]

Note also that when you invoke wget, the server immediately redirects to http://downloads.raspberrypi.org/download.php?file=/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip which is indeed a web page.

Try opening either of those links in your browser:

When you do, you get a download information page. There's a direct link to the download on that page. Pass that link to wget and you'll be set.

share|improve this answer
Thanks for the explanation I very much needed it! – kemra102 Aug 13 '12 at 19:47

You're wget is being redirected (HTTP status 301): Use the direct link instead.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.