Using wget to download a ZIP file

Viewed 41204

I'm having trouble using wget for my Debian 7.0 VPS server hosted by OVH.

I'm trying to download a ZIP file from MediaFire, and when I connected via SSH I typed,

wget http://download1472.mediafire.com/5ndlsskkyfmg/dgx7zbbdbxawbwd/Vhalar-GGJ16.zip

Then, this is my output,

--2016-03-07 20:17:52--  http://download1472.mediafire.com/5ndlsskkyfmg/dgx7zbbd                                                                         bxawbwd/Vhalar-GGJ16.zip
Resolving download1472.mediafire.com (download1472.mediafire.com)... 205.196.123                                                                         .160
Connecting to download1472.mediafire.com (download1472.mediafire.com)|205.196.12                                                                         3.160|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.mediafire.com/?dgx7zbbdbxawbwd [following]
--2016-03-07 20:17:52--  http://www.mediafire.com/?dgx7zbbdbxawbwd
Resolving www.mediafire.com (www.mediafire.com)... 205.196.120.6, 205.196.120.8
Connecting to www.mediafire.com (www.mediafire.com)|205.196.120.6|:80... connect                                                                         ed.
HTTP request sent, awaiting response... 301
Location: /download/dgx7zbbdbxawbwd/Vhalar-GGJ16.zip [following]
--2016-03-07 20:17:52--  http://www.mediafire.com/download/dgx7zbbdbxawbwd/Vhala                                                                         r-GGJ16.zip
Connecting to www.mediafire.com (www.mediafire.com)|205.196.120.6|:80... connect                                                                         ed.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `Vhalar-GGJ16.zip'

    [  <=>                                  ] 94,265       440K/s   in 0.2s

2016-03-07 20:17:52 (440 KB/s) - `Vhalar-GGJ16.zip' saved [94265]

The download took less than 1 second, and it's a 280MB zip file. Also, it seems to say "440 KB/s", and that math just doesn't add up.

I'm confused as to why I can't download this zip file to my server via SSH, instead of downloading it to my computer, then re-uploading it to the server.

Does anyone see a flaw I'm making in my command?

4 Answers

Just one tip for anyone working with wget to download a file, but the URL has a proxy string at the end after the file name (eg.?This_is_a_query_string_sample_&_123545_& ) i.e. the URL is of the form:

http://download1472.mediafire.com/5ndlsskkyfmg/dgx7zbbdbxawbwd/Vhalar-GGJ16.html?This_is_a_query_string_sample_&_123545_&

In this case always use double quotes while using wget (since & has a special meaning in shell environments)

wget "http://download1472.mediafire.com/5ndlsskkyfmg/dgx7zbbdbxawbwd/Vhalar-GGJ16.html?This_is_a_query_string_sample_&_123545_&"

You can also download the zip file specifying a new name to that file with the wget option -O.

wget -O new_name_for_the_file.zip <url-address.zip>
Related