This is a website by Willem van Zyl

I'm a project manager, software developer, Apple evangelist and geek from South Africa. I'm passionate about web and mobile application development, usability, productivity, physics, astronomy, science fiction and fantasy.

If you would like to contact me, message me on Twitter or send me an email.

How to perform segmented downloads on the command line with "aria2c"

26 Jan 2009

aria2 is a Linux / Mac OS X / Windows command line utility that can download files concurrently from multiple HTTP(S) / FTP / BitTorrent sources. While the utility is running, each downloading file is adaptively split into multiple segments with varying segment sizes based on server response times.

It continually trims out slow servers and favors faster ones, and if a file’s sources contain both HTTP(S) / FTP and BitTorrent URIs, content downloaded through HTTP(S) / FTP will be uploaded to the BitTorrent swarm.

Synopsis:

aria2c [OPTIONS] [URL | TORRENT_FILE | METALINK_FILE]…

Usage examples

Download a file via HTTP with the default settings:

aria2c http://appldnld.apple.com.edgesuite.net/
  content.info.apple.com/iPhone/061-5779.20081120.Pt5yH/
  iPhone1,1_2.2_5G77_Restore.ipsw

Download a file via HTTP with 4 parallel download streams (segments):

aria2c -j4 http://appldnld.apple.com.edgesuite.net/
  content.info.apple.com/iPhone/061-5779.
  20081120.Pt5yH/iPhone1,1_2.2_5G77_Restore.ipsw

Download a file via HTTP using a list of URIs to the same file and 4 parallel download streams (segments), using 3 URIs at a time:

aria2c -j4 -s3 -i links.txt

Download a file via BitTorrent using 4 parallel download streams (segments) and a download / upload limit of 20KB per second:

aria2c -j4 --max-download-limit=20K --max-upload-limit=20K
  PwnageTool_2.2.1.dmg.4527959.TPB.torrent

The aria2 man page can be read here, and the utility can be downloaded here.

Do you like this? Share it:

Copyright © Geekology 2011. All Rights Reserved.

Hosted by Code. Like. Clockwork.