1ARIA2C(1)                                                            ARIA2C(1)
2
3
4

NAME

6       aria2c - The ultra fast download utility
7

SYNOPSIS

9       aria2c [OPTIONS] URL ...
10
11       aria2c [OPTIONS] -T TORRENT_FILE [URL ...]
12
13       aria2c [OPTIONS] -M METALINK_FILE
14
15

DESCRIPTION

17       aria2 is a utility for downloading files. The supported protocols are
18       http(s)/ftp/BitTorrent/Metalink. aria2 has powerful segmented
19       downloading ability, downloading a file from multiple sources and
20       multiple protocols, utilizing your download bandwidth to the max. It
21       even supports downloading a file from http(s)/ftp and BitTorrent at the
22       same time, while the data downloaded form http(s)/ftp is uploaded to
23       BitTorrent swarm.
24
25       aria2 also provides most reliable http(s)/ftp downloading experience
26       ever. Using Metalink´s chunk checksums, aria2 automatically validates
27       chunk of data while downloading a file like BitTorrent.
28
29

OPTIONS

31       -d, --dir=DIR
32           The directory to store the downloaded file.
33
34       -o, --out=FILE
35           The file name of the downloaded file.
36
37           Note
38               In Metalink, BitTorrent download you cannot specify file name.
39               The file name specified here is only used when the URLs fed to
40               aria2 is done by command line without -i option, like this:
41               aria2c -o myfile.zip http://mirror1/file.zip
42               http://mirror2/file.zip
43
44       -l, --log=LOG
45           The file name of the log file. If - is specified, log is written to
46           stdout.
47
48       -D, --daemon
49           Run as daemon.
50
51       -s, --split=N
52           Download a file using N connections. N must be between 1 and 5.
53           This option affects all URLs. Thus, aria2 connects to each URL with
54           N connections. Default: 1
55
56       --retry-wait=SEC
57           Set the seconds to wait to retry after an error has occured.
58           Specify a value between 0 and 60. Default: 5
59
60       -t, --timeout=SEC
61           Set timeout in seconds. Default: 60
62
63       -m, --max-tries=N
64           Set number of tries.  0 means unlimited. Default: 5
65
66       --http-proxy=HOST:PORT
67           Use HTTP proxy server. This affects all URLs.
68
69       --http-user=USER
70           Set HTTP user. This affects all URLs.
71
72       --http-passwd=PASSWD
73           Set HTTP password. This affects all URLs.
74
75       --http-proxy-user=USER
76           Set HTTP proxy user. This affects all URLs.
77
78       --http-proxy-passwd=PASSWD
79           Set HTTP proxy password. This affects all URLs.
80
81       --http-proxy-method=METHOD
82           Set the method to use in proxy request.  METHOD is either get or
83           tunnel. Default: tunnel
84
85       --http-auth-scheme=SCHEME
86           Set HTTP authentication scheme. Currently, basic is the only
87           supported scheme. Default: basic
88
89       --referer=REFERER
90           Set Referer. This affects all URLs.
91
92       --ftp-user=USER
93           Set FTP user. This affects all URLs. Default: anonymous
94
95       --ftp-passwd=PASSWD
96           Set FTP password. This affects all URLs. Default: ARIA2USER@
97
98       --ftp-type=TYPE
99           Set FTP transfer type. TYPE is either binary or ascii. Default:
100           binary
101
102       -p, --ftp-pasv
103           Use passive mode in FTP.
104
105       --ftp-via-http-proxy=METHOD
106           Use HTTP proxy in FTP.  METHOD is either get or tunnel. Default:
107           tunnel
108
109       --lowest-speed-limit=SPEED
110           Close connection if download speed is lower than or equal to this
111           value(bytes per sec).  0 means aria2 does not have a lowest speed
112           limit. You can append K or M(1K = 1024, 1M = 1024K). This option
113           does not affect BitTorrent downloads. Default: 0
114
115       --max-download-limit=SPEED
116           Set max download speed in bytes per sec.  0 means unrestricted. You
117           can append K or M(1K = 1024, 1M = 1024K). Default: 0
118
119       --file-allocation=METHOD
120           Specify file allocation method. METHOD is either none or prealloc.
121           none doesn´t pre-allocate file space.  prealloc pre-allocates file
122           space before download begins. This may take some time depending on
123           the size of the file. Default: prealloc
124
125           Note
126               In multi file torrent, the files adjacent forward to the
127               specified files are also allocated if they share a same piece.
128
129       --no-file-allocation-limit=SIZE
130           No file allocation is made for files whose size is smaller than
131           SIZE. You can append K or M(1K = 1024, 1M = 1024K). Default: 5M
132
133       --enable-direct-io[=true|false]
134           Enable directI/O, which lowers cpu usage while allocating/checking
135           files. Turn off if you encounter any error. Default: false
136
137       --allow-overwrite=true|false
138           If false is given, aria2 doesn´t download a file which already
139           exists but the corresponding .aria2 file doesn´t exist. In
140           http(s)/ftp download, if --auto-file-renaming=true then, file name
141           will be renamed. See --auto-file-renaming for details. Default:
142           false
143
144       --allow-piece-length-change=true|false
145           If false is given, aria2 aborts download when a piece length is
146           different from one in a control file. If true is given, you can
147           proceed but some download progress will be lost. Default: false
148
149       -Z, --force-sequential[=true|false]
150           Fetch URIs in the command-line sequentially and download each URI
151           in a separate session, like the usual command-line download
152           utilities. Default: false
153
154       --auto-file-renaming[=true|false]
155           Rename file name if the same file already exists. This option works
156           only in http(s)/ftp download. The new file name has a dot and a
157           number(1..9999) appended. Default: true
158
159       -P, --parameterized-uri[=true|false]
160           Enable parameterized URI support. You can specify set of parts:
161           http://{sv1,sv2,sv3}/foo.iso. Also you can specify numeric
162           sequences with step counter: http://host/image[000-100:2].img. A
163           step counter can be omitted. If all URIs do not point to the same
164           file, such as the second example above, -Z option is required.
165           Default: false
166
167       --enable-http-keep-alive[=true|false]
168           Enable HTTP/1.1 persistent connection. Default: false
169
170       --enable-http-pipelining[=true|false]
171           Enable HTTP/1.1 pipelining. Default: false
172
173       --check-integrity=true|false
174           Check file integrity by validating piece hash. This option only
175           affects in BitTorrent downloads and Metalink downloads with chunk
176           checksums. Use this option to re-download a damaged portion of a
177           file. Default: false
178
179       --realtime-chunk-checksum=true|false
180           Validate chunk of data by calculating checkusm while download a
181           file if chunk checksums are provided. Currently Metalink is the
182           only way to to provide chunk checksums. Default: true
183
184       -c, --continue
185           Continue downloading a partially downloaded file. Use this option
186           to resume a download started by a web browser or another program
187           which downloads files sequentially from the beginning. Currently
188           this option is only applicable to http(s)/ftp downloads.
189
190       -U, --user-agent=USER_AGENT
191           Set user agent for http(s) downloads.
192
193       -n, --no-netrc
194           Disables netrc support. netrc support is enabled by default.
195
196       -i, --input-file=FILE
197           Downloads URIs found in FILE. You can specify multiple URIs for a
198           single entity: separate URIs on a single line using the TAB
199           character. Reads input from stdin when - is specified.
200
201       -j, --max-concurrent-downloads=N
202           Set maximum number of concurrent downloads. It should be used with
203           the -i option. Default: 5
204
205       --load-cookies=FILE
206           Load cookies from FILE. The format of FILE is the same used by
207           Netscape and Mozilla.
208
209       -S, --show-files
210           Print file listing of .torrent or .metalink file and exit. In case
211           of .torrent file, additional information (infohash, piece length,
212           etc) is also printed.
213
214       --select-file=INDEX...
215           Set file to download by specifing its index. You can find the file
216           index using the --show-files option. Multiple indexes can be
217           specified by using ",", for example: 3,6. You can also use "-" to
218           specify a range: 1-5. "," and "-" can be used together: 1-5,8,9.
219           When used with the -M option, index may vary depending on the query
220           (see --metalink-* options).
221
222           Note
223               In multi file torrent, the adjacent files specified by this
224               option may also be downloaded. This is by design, not a bug. A
225               single piece may include several files or part of files, and
226               aria2 writes the piece to the appropriate files.
227
228       -T, --torrent-file=TORRENT_FILE
229           The path to the .torrent file.
230
231       --follow-torrent=true|false|mem
232           If true or mem is specified, when a file whose suffix is .torrent
233           or content type is application/x-bittorrent is downloaded, aria2
234           parses it as a torrent file and downloads files mentioned in it. If
235           mem is specified, a torrent file is not written to the disk, but is
236           just kept in memory. If false is specified, the action mentioned
237           above is not taken. Default: true
238
239       --direct-file-mapping=true|false
240           Directly read from and write to each file mentioned in .torrent
241           file. Use this option if lots of files are listed in .torrent file
242           and aria2 complains it cannot open files anymore. Default: true
243
244       --listen-port=PORT...
245           Set TCP port number for BitTorrent downloads. Multiple ports can be
246           specified by using ",", for example: 6881,6885. You can also use
247           "-" to specify a range: 6881-6999. "," and "-" can be used
248           together: 6881-6889,6999. Default: 6881-6999
249
250           Note
251               Make sure that the specified ports are open for incoming TCP
252               traffic.
253
254       --max-upload-limit=SPEED
255           Set max upload speed in bytes per sec.  0 means unrestricted. You
256           can append K or M(1K = 1024, 1M = 1024K). Default: 0
257
258       --seed-time=MINUTES
259           Specify seeding time in minutes. Also see the --seed-ratio option.
260
261       --seed-ratio=RATIO
262           Specify share ratio. Seed completed torrents until share ratio
263           reaches] RATIO. I strongly encourages you to specify equals or more
264           than 1.0 here. Specify 0.0 if you intend to do seeding regardless
265           of share ratio. If --seed-time option is specified along with this
266           option, seeding ends when at least one of the conditions is
267           satisfied. Default: 1.0
268
269       --peer-id-prefix=PEERI_ID_PREFIX
270           Specify the prefix of peer ID. The peer ID in BitTorrent is 20 byte
271           length. If more than 20 bytes are specified, only first 20 bytes
272           are used. If less than 20 bytes are specified, the random alphabet
273           characters are added to make it´s length 20 bytes. Default: -aria2-
274
275       -M, --metalink-file=METALINK_FILE
276           The file path to .metalink file.
277
278       -C, --metalink-servers=NUM_SERVERS
279           The number of servers to connect to simultaneously. Some metalinks
280           regulates the number of servers to connect. aria2 respects them.
281           Default: 5
282
283       --metalink-version=VERSION
284           The version of the file to download.
285
286       --metalink-language=LANGUAGE
287           The language of the file to download.
288
289       --metalink-os=OS
290           The operating system of the file to download.
291
292       --metalink-location=LOCATION[,...]
293           The location of the preferred server. A comma-deliminated list of
294           locations is acceptable, for example, JP,US.
295
296       --follow-metalink=true|false|mem
297           If true or mem is specified, when a file whose suffix is .metaink
298           or content type is application/metalink+xml is downloaded, aria2
299           parses it as a metalink file and downloads files mentioned in it.
300           If mem is specified, a metalink file is not written to the disk,
301           but is just kept in memory. If false is specified, the action
302           mentioned above is not taken. Default: true
303
304       -v, --version
305           Print the version number, copyright and the configuration
306           information and exit.
307
308       -h, --help
309           Print this message and exit.
310
311       URL
312           You can specify multiple URLs. Unless you specify -Z option, all
313           URLs must point to the same file or downloading will fail. You can
314           specify both torrent file with -T option and URLs. By doing this,
315           download a file from both torrent swarm and http(s)/ftp server at
316           the same time, while the data from http(s)/ftp are uploaded to the
317           torrent swarm. Note that only single file torrent can be integrated
318           with http(s)/ftp.
319
320           Note
321               Make sure that URL is quoted with single(´) or double(")
322               quotation if it contains "&" or any characters that have
323               special meaning in shell.
324

EXAMPLES

326   HTTP/FTP Segmented Download
327       Download a file using 1 connection
328                  aria2c http://host/file.zip
329
330              Note
331              To pause a download, press Ctrl-C. You can resume the transfer
332              by run aria2c with the same argument at the same directory. You
333              can change URLs as long as they are pointing to the same file.
334
335
336       Download a file using 2 connections
337                  aria2c -s 2 http://host/file.zip
338
339       Download a file from 2 difference http servers
340                  aria2c http://host1/file.zip ftp://host2/file.zip
341
342       Download a file from http and ftp servers
343                  aria2c http://host1/file.zip ftp://host2/file.zip
344
345       Download files listed in a file concurrently
346                  aria2c -i files.txt -j 5
347
348              Note
349              -j option specifies the number of concurrent downloads.
350
351
352   Metalink Download
353       Download files with remote Metalink
354                  aria2c --follow-metalink=mem http://host/file.metalink
355
356       Download using a local metalink file
357                  aria2c -p -t 10 --lowest-speed-limit 4000 -M test.metalink
358
359              Note
360              To pause a download, press Ctrl-C. You can resume the transfer
361              by run aria2c with the same argument at the same directory.
362
363
364       Download only selected files using index
365                  aria2c -M test.metalink --select-file 1-4,8
366
367              Note
368              The index is printed to the console using -S option.
369
370
371       Download a file using a local .metalink file with user preference
372                  aria2c -M test.metalink --metalink-location=JP,US --metalink-version=1.1 --metalink-language=en-US
373
374   BitTorrent Download
375       Download files from remote BitTorrent file
376                  aria2c --follow-bittorrent=mem http://host/file.torrent
377
378       Download using a local torrent file
379                  aria2c --max-upload-limit 40K -T file.torrent
380
381              Note
382              --max-upload-limit specifies the max of upload rate.
383
384
385              Note
386              To pause a download, press Ctrl-C. You can resume the transfer
387              by run aria2c with the same argument at the same directory.
388
389
390       Download a file using torrent and http/ftp server
391                  aria2c -T test.torrent http://host1/file ftp://host2/file
392
393              Note
394              Downloading multi file torrent with http/ftp is not supported.
395
396
397       Download only selected files using index(usually called "selectable
398       download")
399                  aria2c -T test.torrent --select-file 1-4,8
400
401              Note
402              The index is printed to the console using -S option.
403
404
405       Change the listening port for incoming peer
406                  aria2c -T test.torrent --listen-port 7000-7001,8000
407
408       Specify the condition to stop program after torrent download finished
409                  aria2c -T test.torrent --seed-time 120 --seed-ratio 1.0
410
411              Note
412              In the above example, the program exists when the 120 minutes
413              has elapsed since download completed or seed ratio reaches 1.0.
414
415
416       Throttle upload speed
417                  aria2c -T test.torrent --max-upload-limit 100K
418
419   More advanced HTTP features
420       Load cookies
421                  aria2c --load-cookies cookies.txt http://host/file.zip
422
423              Note
424              You can use Firefox/Mozilla´s cookie file without modification.
425
426
427       Resume download started by web browsers or another programs
428                  aria2c -c -s 2 http://host/partiallydownloadedfile.zip
429
430   And more advanced features
431       Throttle download speed
432                  aria2c -M test.metalink --max-download-limit 100K
433
434       Repair a damaged download using --check-integrity option
435                  aria2c -M test.metalink --check-integrity=true
436
437              Note
438              This option is only available used with BitTorrent or metalink
439              with chunk checksums.
440
441
442       Drop connection if download speed is lower than specified value
443                  aria2c -M test.metalink --lowest-speed-limit 10K
444
445       Parameterized URI support
446              You can specify set of parts:
447
448
449                  aria2c -P http://{host1,host2,host3}/file.iso
450              You can specify numeric sequence:
451
452
453                  aria2c -Z -P http://host/image[000-100].png
454
455              Note
456              -Z option is required if the all URIs don´t point to the same
457              file, such as the above example.
458
459
460              You can specify step counter:
461
462
463                  aria2c -Z -P http://host/image[A-Z:2].png
464

RESUME DOWNLOAD

466       Usually, you can resume transfer by just issuing same command(aria2c
467       URL) if the previous transfer is made by aria2.
468
469       If the previous transfer is made by a browser or wget like sequencial
470       download manager, then use -c option to continue the transfer(aria2c -c
471       URL).
472
473

CONTROL FILE

475       aria2 uses a control file to keep track the progress of download. A
476       control file is placed at the same directory of the dowloading file and
477       its filename is the filename of downloading file with ".aria2"
478       appended. For example, if you are downloading file.zip, then the
479       control file should be file.zip.aria2. (There is a exception for this
480       naming convention. If you are downloading a multi torrent, its control
481       file is the "top directory" name of the torrent with ".aria2" appended.
482       The "top directory" name is a value of "name" key in "info" directory
483       in a torrent file.)
484
485       Usually a control file is deleted once download completed. If aria2
486       decides that download cannot be resumed(for example, when downloading a
487       file from a http server which doesn´t support resume), a control file
488       is not created.
489
490       Normally if you lose a control file, you cannot resume download. But if
491       you have a torrent or metalink with chunk checksums for the file, you
492       can resume the download without a control file by giving
493       --check-integrity=true option to aria2c in command-line.
494
495

SEEDING DOWNLOADED FILE IN BITTORRENT

497       You can seed downloaded file using --check-integrity=true option.
498
499
500           aria2c --check-integrity=true -T file.torrent
501

FILES

503   aria2.conf
504       User configuration file. It must be placed under ~/.aria2 and must be
505       named as aria2.conf. In each line, there is 1 parameter whose syntax is
506       name=value pair, where name is the long command-line option name
507       without -- prefix. The lines beginning # are treated as comments.
508
509
510           # sample configuration file for aria2c
511           file-allocation=prealloc
512           listen-port=60000
513           seed-ratio=1.0
514           max-upload-limit=100K
515           ftp-pasv=true
516

RESOURCES

518       Project web site: http://aria2.sourceforge.net/
519
520       metalink: http://www.metalinker.org/
521
522

REPORTING BUGS

524       Report bugs to Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
525
526

AUTHOR

528       Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
529
530
532       Copyright © 2006, 2007 Tatsuhiro Tsujikawa
533
534       This program is free software; you can redistribute it and/or modify it
535       under the terms of the GNU General Public License as published by the
536       Free Software Foundation; either version 2 of the License, or (at your
537       option) any later version.
538
539       This program is distributed in the hope that it will be useful, but
540       WITHOUT ANY WARRANTY; without even the implied warranty of
541       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
542       General Public License for more details.
543
544       You should have received a copy of the GNU General Public License along
545       with this program; if not, write to the Free Software Foundation, Inc.,
546       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
547
548       In addition, as a special exception, the copyright holders give
549       permission to link the code of portions of this program with the
550       OpenSSL library under certain conditions as described in each
551       individual source file, and distribute linked combinations including
552       the two. You must obey the GNU General Public License in all respects
553       for all of the code used other than OpenSSL. If you modify file(s) with
554       this exception, you may extend this exception to your version of the
555       file(s), but you are not obligated to do so. If you do not wish to do
556       so, delete this exception statement from your version. If you delete
557       this exception statement from all source files in the program, then
558       also delete it here.
559
560
561
562
563                                  12/08/2007                         ARIA2C(1)
Impressum