Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to download using wget in binary mode - linux

Tags:

linux

wget

I need to download *.tar.gz file from server but when I do that, I get an error

ERROR: The ./files.tic seems to be corrupted.

I think it is because it has been downloaded in ASCII mode, and I need to download in binary mode.
How to run wget in binary mode? Or any other command to get binary file.

This file is from http, not ftp.

like image 599
miszczu Avatar asked Sep 10 '12 11:09

miszczu


People also ask

How do I download a binary file in Linux?

Use chmod + x <filename> at the prompt to make a . bin file executable. Once the BIN file is executable, you can run it using the command ./<filename> or by double-clicking the file in your file manager.

How do I download wget packages in Linux?

The wget package is pre-installed on most Linux distributions today. To check whether the Wget package is installed on your system, open up your console, type wget , and press enter. If you have wget installed, the system will print wget: missing URL . Otherwise, it will print wget command not found .

How do I download a package using wget?

In order to download a file using Wget, type wget followed by the URL of the file that you wish to download. Wget will download the file in the given URL and save it in the current directory.


1 Answers

AFAIK the MIME type for the file does not change its contents. So you should be already getting the right representation of it. HTTP protocol does not have text/binary types for data. Data is data :)

See http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Response_message for further info.

like image 60
bcelary Avatar answered Sep 19 '22 21:09

bcelary