How To Do safer downloads (Updated 2021-06-24)

Hello,

  • OpenMandriva Lx version:
    ALL

  • Desktop environment (KDE, LXQT…):
    ALL

  • Description of the issue (screenshots if relevant):
    Downloads get interrupted sometimes. Especially frustrating for larger downloads like ISO files.

  • Relevant informations (hardware involved, software version, logs or output…):

In Konsole first cd to the directory where you want to download an ISO file then choose one of the following commands:

$ aria2c -c -m 0 <URL_to_download.iso>

$ wget -d -c --tries=0 --read-timeout=30 <URL_to_download.iso>

$ curl -L -C - <URL_to_download.iso>

This post expands on the curl command and exlains the options in the command string.

Normally you would download as user not as root.

$ curl -L -C - -o "myfile.iso" "http://example.com/file.iso

Here is what the options mean :

Option What It Does
-L Some URLs redirect to some other sites. This option tells cURL to obtain the file from that redirected location.
-C – This option is for telling cURL to resume download and the dash ("-") that follows it is to automatically detect the size of the file to continue downloading.
-o This parameter says the output location of the file being downloaded.

The last quoted value is the URL of the file. This command can be used to download for the first time as well as resuming it later.

1 Like

This post expands on the aria2c command and exlains the options in the command string.

Normally you would download as user not as root.

$ aria2c -c -m 0 -o "myfile.iso" "http://example.com/file.iso"

Here is the explanation of each options used in the above command :

Option What It Does
-c Tells aria2c to resume downloads
-m 0 This option will make aria2c retry downloads for unlimited times. Some servers tend to break connection after some time. But, this option makes aria2c to auto retry when such things happen.
-o This parameter says the output location of the file being downloaded.

Like before, the last quoted value is the URL of the file.

1 Like

This post expands on the wget command and exlains the options in the command string.

Normally you would download as user not as root.

$ wget -d -c --tries=0 --read-timeout=30 -O "myfile.iso" "http://example.com/file.iso"

And here is the explanation of the options used :

Option What It Does
-d Tells wGet to Download the File
-c Tells wGet to resume download
–tries=0 Tells wGet to retry connections unlimitedly when it is interrupted.
–read-timeout=30 If no response is received in 30 seconds, exit and establish a new connection
-O Sets the output location of the downloaded file.

Like before, the last quoted value is the URL of the file.

Have fun downloading

2 Likes

Thread updated and simplified 2021-06-24.