aria2c.1.txt 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350
  1. ARIA2C(1)
  2. =========
  3. Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
  4. NAME
  5. ----
  6. aria2c - The ultra fast download utility
  7. SYNOPSIS
  8. --------
  9. aria2c ['OPTIONS'] ['URL' | 'TORRENT_FILE' | 'METALINK_FILE']...
  10. DESCRIPTION
  11. -----------
  12. aria2 is a utility for downloading files. The supported protocols are
  13. HTTP(S), FTP, BitTorrent, and Metalink. aria2 can download a file from
  14. multiple sources/protocols and tries to utilize your maximum download
  15. bandwidth. It supports downloading a file from HTTP(S)/FTP and
  16. BitTorrent at the same time, while the data downloaded from
  17. HTTP(S)/FTP is uploaded to the BitTorrent swarm. Using Metalink's
  18. chunk checksums, aria2 automatically validates chunks of data while
  19. downloading a file like BitTorrent.
  20. OPTIONS
  21. -------
  22. Basic Options
  23. ~~~~~~~~~~~~~
  24. *-d*, *--dir*=DIR::
  25. The directory to store the downloaded file.
  26. *-i*, *--input-file*=FILE::
  27. Downloads URIs found in FILE. You can specify multiple URIs for a single
  28. entity: separate URIs on a single line using the TAB character.
  29. Reads input from stdin when '-' is specified.
  30. The additional *out* and *dir* options can be specified after each line of
  31. URIs. This optional line must start with white space(s).
  32. See *Input File* subsection for details.
  33. *-l*, *--log*=LOG::
  34. The file name of the log file. If '-' is specified, log is written to
  35. stdout.
  36. *-j*, *--max-concurrent-downloads*=N::
  37. Set maximum number of parallel downloads for every static (HTTP/FTP) URL,
  38. torrent and metalink. See also *-s* and *-C* option.
  39. Default: '5'
  40. *-V*, *--check-integrity*[='true'|'false']::
  41. Check file integrity by validating piece hashes.
  42. This option has effect only in BitTorrent and Metalink downloads with
  43. chunk checksums.
  44. Use this option to re-download a damaged portion of a file.
  45. Default: 'false'
  46. *-c*, *--continue*::
  47. Continue downloading a partially downloaded file.
  48. Use this option to resume a download started by a web browser or another
  49. program which downloads files sequentially from the beginning.
  50. Currently this option is only applicable to HTTP(S)/FTP downloads.
  51. *-h*, *--help*[=CATEGORY]::
  52. Print usage and exit.
  53. The help messages are classified in several categories.
  54. For example, type "*--help*=http" for detailed explanation for the options
  55. related to HTTP. If no matching category is found, search option name using
  56. a given word in middle match and print the result.
  57. Available Values: 'basic', 'advanced', 'http', 'https', 'ftp', 'metalink',
  58. 'bittorrent', 'all'
  59. Default: 'basic'
  60. HTTP/FTP Options
  61. ~~~~~~~~~~~~~~~~
  62. *--all-proxy*=PROXY::
  63. Use this proxy server for all protocols.
  64. You can override this setting and specify a proxy server for a particular
  65. protocol using *--http-proxy*, *--https-proxy* and *--ftp-proxy* options.
  66. This affects all URLs.
  67. The format of PROXY is [\http://][USER:PASSWORD@]HOST[:PORT]
  68. *--connect-timeout*=SEC::
  69. Set the connect timeout in seconds to establish connection to
  70. HTTP/FTP/proxy server. After the connection is established, this
  71. option makes no effect and *--timeout* option is used instead.
  72. Default: '60'
  73. *--dry-run*[='true'|'false']::
  74. If 'true' is given, aria2 just checks whether the remote file is
  75. available and doesn't download data. This option has effect on
  76. HTTP/FTP download. BitTorrent downloads are canceled if 'true' is
  77. specified. Default: 'false'
  78. *--lowest-speed-limit*=SPEED::
  79. Close connection if download speed is lower than or equal to this
  80. value(bytes per sec).
  81. '0' means aria2 does not have a lowest speed limit.
  82. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  83. This option does not affect BitTorrent downloads.
  84. Default: '0'
  85. *--max-file-not-found*=NUM::
  86. If aria2 receives `file not found' status from the remote HTTP/FTP
  87. servers NUM times without getting a single byte, then force the
  88. download to fail. Specify '0' to disable this option. This options is
  89. effective only when using HTTP/FTP servers.
  90. Default: '0'
  91. *-m*, *--max-tries*=N::
  92. Set number of tries. '0' means unlimited.
  93. Default: '5'
  94. *-n*, *--no-netrc*::
  95. Disables netrc support. netrc support is enabled by default.
  96. *--no-proxy*=DOMAINS::
  97. Specify comma separated hostnames or domains where proxy should not be
  98. used.
  99. *-o*, *--out*=FILE::
  100. The file name of the downloaded file.
  101. [NOTE]
  102. In Metalink or BitTorrent download you cannot specify file name.
  103. The file name specified here is only used when the URLs fed to aria2
  104. are done by command line without *-i*, *-Z* option. For example:
  105. aria2c -o myfile.zip "http://mirror1/file.zip" "http://mirror2/file.zip"
  106. *--proxy-method*=METHOD::
  107. Set the method to use in proxy request. 'METHOD' is either 'get' or
  108. 'tunnel'. HTTPS downloads always use 'tunnel' regardless of this
  109. option.
  110. Default: 'get'
  111. *-R*, *--remote-time*[='true'|'false']::
  112. Retrieve timestamp of the remote file from the remote HTTP/FTP
  113. server and if it is available, apply it to the local file.
  114. Default: 'false'
  115. *--retry-wait*=SEC::
  116. Set the seconds to wait to retry after an error has occured.
  117. Specify a value between '0' and '60'.
  118. Default: '5'
  119. *--server-stat-of*=FILE::
  120. Specify the filename to which performance profile of the servers is
  121. saved. You can load saved data using *--server-stat-if* option. See
  122. *Server Performance Profile* subsection below for file format.
  123. *--server-stat-if*=FILE::
  124. Specify the filename to load performance profile of the servers. The
  125. loaded data will be used in some URI selector such as 'feedback'.
  126. See also *--uri-selector* option. See *Server Performance Profile*
  127. subsection below for file format.
  128. *--server-stat-timeout*=SEC::
  129. Specifies timeout in seconds to invalidate performance profile of
  130. the servers since the last contact to them.
  131. Default: '86400' (24hours)
  132. *-s*, *--split*=N::
  133. Download a file using N connections.
  134. If more than N URLs are given, first N URLs are used and remaining URLs are
  135. used for backup.
  136. If less than N URLs are given, those URLs are used more than once so that N
  137. connections total are made simultaneously.
  138. Please see *-j* option too.
  139. Please note that in Metalink download, this option has no effect and use
  140. *-C* option instead.
  141. Default: '5'
  142. *-t*, *--timeout*=SEC::
  143. Set timeout in seconds.
  144. Default: '60'
  145. *--uri-selector*=SELECTOR::
  146. Specify URI selection algorithm. The possible values are 'inorder',
  147. 'feedback' and 'adaptive'. If 'inorder' is given, URI is tried in
  148. the order appeared in the URI list. If 'feedback' is given, aria2
  149. uses download speed observed in the previous downloads and choose
  150. fastest server in the URI list. This also effectively skips dead
  151. mirrors. The observed download speed is a part of performance
  152. profile of servers mentioned in *--server-stat-of* and
  153. *--server-stat-if* options. If 'adaptive' is given, selects one of
  154. the best mirrors for the first and reserved connections. For
  155. supplementary ones, it returns mirrors which has not been tested
  156. yet, and if each of them has already been tested, returns mirrors
  157. which has to be tested again. Otherwise, it doesn't select anymore
  158. mirrors. Like 'feedback', it uses a performance profile of servers.
  159. Default: 'feedback'
  160. HTTP Specific Options
  161. ~~~~~~~~~~~~~~~~~~~~~
  162. *--ca-certificate*=FILE::
  163. Use the certificate authorities in FILE to verify the peers.
  164. The certificate file must be in PEM format and can contain multiple CA
  165. certificates.
  166. Use *--check-certificate* option to enable verification.
  167. *--certificate*=FILE::
  168. Use the client certificate in FILE.
  169. The certificate must be in PEM format.
  170. You may use *--private-key* option to specify the private key.
  171. *--check-certificate*[='true'|'false']::
  172. Verify the peer using certificates specified in *--ca-certificate* option.
  173. Default: 'true'
  174. *--http-auth-challenge*[='true'|'false']::
  175. Send HTTP authorization header only when it is requested by the
  176. server. If 'false' is set, then authorization header is always sent
  177. to the server. There is an exception: if username and password are
  178. embedded in URI, authorization header is always sent to the server
  179. regardless of this option. Default: 'false'
  180. *--http-auth-scheme*=SCHEME::
  181. Set HTTP authentication scheme.
  182. Currently, 'basic' is the only supported scheme.
  183. Default: 'basic'
  184. *--http-user*=USER::
  185. Set HTTP user. This affects all URLs.
  186. *--http-passwd*=PASSWD::
  187. Set HTTP password. This affects all URLs.
  188. *--http-proxy*=PROXY::
  189. Use this proxy server for HTTP. See also *--all-proxy* option.
  190. This affects all URLs.
  191. The format of PROXY is [\http://][USER:PASSWORD@]HOST[:PORT]
  192. *--https-proxy*=PROXY::
  193. Use this proxy server for HTTPS. See also *--all-proxy* option.
  194. This affects all URLs.
  195. The format of PROXY is [\http://][USER:PASSWORD@]HOST[:PORT]
  196. *--private-key*=FILE::
  197. Use the private key in FILE.
  198. The private key must be decrypted and in PEM format.
  199. The behavior when encrypted one is given is undefined.
  200. See also *--certificate* option.
  201. *--referer*=REFERER::
  202. Set Referer. This affects all URLs.
  203. *--enable-http-keep-alive*[='true'|'false']::
  204. Enable HTTP/1.1 persistent connection.
  205. Default: 'true'
  206. *--enable-http-pipelining*[='true'|'false']::
  207. Enable HTTP/1.1 pipelining.
  208. Default: 'false'
  209. *--header*=HEADER::
  210. Append HEADER to HTTP request header.
  211. You can use this option repeatedly to specify more than one header:
  212. aria2c *--header*="X-A: b78" *--header*="X-B: 9J1" "http://host/file"
  213. *--load-cookies*=FILE::
  214. Load Cookies from FILE using the Firefox3 format (SQLite3) and the
  215. Mozilla/Firefox(1.x/2.x)/Netscape format.
  216. [NOTE]
  217. If aria2 is built without libsqlite3, then it doesn't support Firefox3 cookie format.
  218. *--save-cookies*=FILE::
  219. Save Cookies to FILE in Mozilla/Firefox(1.x/2.x)/ Netscape
  220. format. If FILE already exists, it is overwritten. Session Cookies
  221. are also saved and their expiry values are treated as 0. Possible
  222. Values: '/path/to/file'
  223. *--use-head*[='true'|'false']::
  224. Use HEAD method for the first request to the HTTP server.
  225. Default: 'true'
  226. *-U*, *--user-agent*=USER_AGENT::
  227. Set user agent for HTTP(S) downloads.
  228. FTP Specific Options
  229. ~~~~~~~~~~~~~~~~~~~~
  230. *--ftp-user*=USER::
  231. Set FTP user. This affects all URLs.
  232. Default: 'anonymous'
  233. *--ftp-passwd*=PASSWD::
  234. Set FTP password. This affects all URLs.
  235. Default: 'ARIA2USER@'
  236. *-p*, *--ftp-pasv*[='true'|'false']::
  237. Use the passive mode in FTP.
  238. If 'false' is given, the active mode will be used.
  239. Default: 'true'
  240. *--ftp-proxy*=PROXY::
  241. Use this proxy server for FTP. See also *--all-proxy* option.
  242. This affects all URLs.
  243. The format of PROXY is [\http://][USER:PASSWORD@]HOST[:PORT]
  244. *--ftp-type*=TYPE::
  245. Set FTP transfer type. TYPE is either 'binary' or 'ascii'.
  246. Default: 'binary'
  247. *--ftp-reuse-connection*[='true'|'false']::
  248. Reuse connection in FTP.
  249. Default: 'true'
  250. BitTorrent/Metalink Options
  251. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  252. *--select-file*=INDEX...::
  253. Set file to download by specifying its index.
  254. You can find the file index using the *--show-files* option.
  255. Multiple indexes can be specified by using ",", for example: '3,6'.
  256. You can also use "-" to specify a range: '1-5'.
  257. "," and "-" can be used together: '1-5,8,9'.
  258. When used with the -M option, index may vary depending on the query
  259. (see *--metalink-** options).
  260. [NOTE]
  261. In multi file torrent, the adjacent files specified by this option may
  262. also be downloaded. This is by design, not a bug.
  263. A single piece may include several files or part of files, and aria2
  264. writes the piece to the appropriate files.
  265. *-S*, *--show-files*::
  266. Print file listing of .torrent or .metalink file and exit.
  267. In case of .torrent file, additional information
  268. (infohash, piece length, etc) is also printed.
  269. BitTorrent Specific Options
  270. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  271. *--bt-external-ip*=IPADDRESS::
  272. Specify the external IP address to report to a BitTorrent
  273. tracker. Although this function is named "external", it can accept
  274. any kind of IP addresses. IPADDRESS must be a numeric IP address.
  275. *--bt-hash-check-seed*[='true'|'false']::
  276. If 'true' is given, after hash check using *--check-integrity* option and
  277. file is complete, continue to seed file. If you want to check file
  278. and download it only when it is damaged or incomplete, set this
  279. option to 'false'. This option has effect only on BitTorrent download.
  280. Default: 'true'
  281. *--bt-max-open-files*=NUM::
  282. Specify maximum number of files to open in each BitTorrent download.
  283. Default: '100'
  284. *--bt-max-peers*=NUM::
  285. Specify the maximum number of peers per torrent. '0' means
  286. unlimited. See also *--bt-request-peer-speed-limit* option.
  287. Default: '55'
  288. *--bt-min-crypto-level*='plain'|'arc4'::
  289. Set minimum level of encryption method.
  290. If several encryption methods are provided by a peer, aria2 chooses the lowest
  291. one which satisfies the given level.
  292. Default: 'plain'
  293. *--bt-require-crypto*='true'|'false'::
  294. If true is given, aria2 doesn't accept and establish connection with legacy
  295. BitTorrent handshake(\19BitTorrent protocol).
  296. Thus aria2 always uses Obfuscation handshake.
  297. Default: 'false'
  298. *--bt-request-peer-speed-limit*=SPEED::
  299. If the whole download speed of every torrent is lower than SPEED,
  300. aria2 temporarily increases the number of peers to try for more
  301. download speed. Configuring this option with your preferred download
  302. speed can increase your download speed in some cases.
  303. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  304. Default: '50K'
  305. *--bt-seed-unverified*[='true'|'false']::
  306. Seed previously downloaded files without verifying piece hashes.
  307. Default: 'false'
  308. *--bt-tracker-interval*=SEC::
  309. Set the interval in seconds between tracker requests. This
  310. completely overrides interval value and aria2 just uses this value
  311. and ignores the min interval and interval value in the response of
  312. tracker. If '0' is set, aria2 determines interval based on the
  313. response of tracker and the download progress. Default: '0'
  314. *--dht-entry-point*=HOST:PORT::
  315. Set host and port as an entry point to DHT network.
  316. *--dht-file-path*=PATH::
  317. Change the DHT routing table file to PATH.
  318. Default: '$HOME/.aria2/dht.dat'
  319. *--dht-listen-port*=PORT...::
  320. Set UDP listening port for DHT.
  321. Multiple ports can be specified by using ",", for example: '6881,6885'.
  322. You can also use "-" to specify a range: '6881-6999'. "," and "-" can be used
  323. together.
  324. Default: '6881-6999'
  325. [NOTE]
  326. Make sure that the specified ports are open for incoming UDP traffic.
  327. *--enable-dht*[='true'|'false']::
  328. Enable DHT functionality. If a private flag is set in a torrent, aria2
  329. doesn't use DHT for that download even if 'true' is given.
  330. Default: 'false'
  331. *--enable-peer-exchange*[='true'|'false']::
  332. Enable Peer Exchange extension. If a private flag is set in a torrent, this
  333. feature is disabled for that download even if 'true' is given.
  334. Default: 'true'
  335. *--follow-torrent*='true'|'false'|'mem'::
  336. If 'true' or 'mem' is specified, when a file whose suffix is ".torrent" or content
  337. type is "application/x-bittorrent" is downloaded, aria2 parses it as a torrent
  338. file and downloads files mentioned in it.
  339. If 'mem' is specified, a torrent file is not written to the disk, but is just
  340. kept in memory.
  341. If 'false' is specified, the action mentioned above is not taken.
  342. Default: 'true'
  343. *-O*, *--index-out*=INDEX=PATH::
  344. Set file path for file with index=INDEX. You can find the file index
  345. using the *--show-files* option. PATH is a relative path to the
  346. path specified in *--dir* option. You can use this option multiple
  347. times. Using this option, you can specify the output filenames of
  348. BitTorrent downloads.
  349. *--listen-port*=PORT...::
  350. Set TCP port number for BitTorrent downloads.
  351. Multiple ports can be specified by using ",", for example: '6881,6885'.
  352. You can also use "-" to specify a range: '6881-6999'.
  353. "," and "-" can be used together: '6881-6889,6999'.
  354. Default: '6881-6999'
  355. [NOTE]
  356. Make sure that the specified ports are open for incoming TCP traffic.
  357. *--max-overall-upload-limit*=SPEED::
  358. Set max overall upload speed in bytes/sec.
  359. '0' means unrestricted.
  360. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  361. To limit the upload speed per torrent, use *--max-upload-limit* option.
  362. Default: '0'
  363. *-u*, *--max-upload-limit*=SPEED::
  364. Set max upload speed per each torrent in bytes/sec.
  365. '0' means unrestricted.
  366. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  367. To limit the overall upload speed, use *--max-overall-upload-limit* option.
  368. Default: '0'
  369. *--peer-id-prefix*=PEERI_ID_PREFIX::
  370. Specify the prefix of peer ID. The peer ID in BitTorrent is 20 byte length.
  371. If more than 20 bytes are specified, only first 20 bytes are used.
  372. If less than 20 bytes are specified, the random alphabet characters are
  373. added to make it's length 20 bytes.
  374. Default: '-aria2-'
  375. *--seed-ratio*=RATIO::
  376. Specify share ratio. Seed completed torrents until share ratio reaches
  377. RATIO.
  378. You are strongly encouraged to specify equals or more than '1.0' here.
  379. Specify '0.0' if you intend to do seeding regardless of share ratio.
  380. If *--seed-time* option is specified along with this option, seeding ends when
  381. at least one of the conditions is satisfied.
  382. Default: '1.0'
  383. *--seed-time*=MINUTES::
  384. Specify seeding time in minutes. Also see the *--seed-ratio* option.
  385. *-T*, *--torrent-file*=TORRENT_FILE::
  386. The path to the .torrent file.
  387. You are not required to use this option because you can specify a torrent file without -T.
  388. Metalink Specific Options
  389. ~~~~~~~~~~~~~~~~~~~~~~~~~
  390. *--follow-metalink*='true'|'false'|'mem'::
  391. If 'true' or 'mem' is specified, when a file whose suffix is ".metaink" or content
  392. type of "application/metalink+xml" is downloaded, aria2 parses it as a metalink
  393. file and downloads files mentioned in it.
  394. If 'mem' is specified, a metalink file is not written to the disk, but is just
  395. kept in memory.
  396. If 'false' is specified, the action mentioned above is not taken.
  397. Default: 'true'
  398. *-M*, *--metalink-file*=METALINK_FILE::
  399. The file path to .metalink file. You are not required to use this option because you can
  400. specify a metalink file without -M.
  401. *-C*, *--metalink-servers*=NUM_SERVERS::
  402. The number of servers to connect to simultaneously.
  403. Some Metalinks regulate the number of servers to connect.
  404. aria2 strictly respects them.
  405. This means that if Metalink defines the maxconnections attribute lower
  406. than NUM_SERVERS, then aria2 uses the value of maxconnections attribute
  407. instead of NUM_SERVERS.
  408. See also *-s* and *-j* options.
  409. Default: '5'
  410. *--metalink-language*=LANGUAGE::
  411. The language of the file to download.
  412. *--metalink-location*=LOCATION[,...]::
  413. The location of the preferred server.
  414. A comma-delimited list of locations is acceptable, for example, 'JP,US'.
  415. *--metalink-os*=OS::
  416. The operating system of the file to download.
  417. *--metalink-version*=VERSION::
  418. The version of the file to download.
  419. *--metalink-preferred-protocol*=PROTO::
  420. Specify preferred protocol.
  421. The possible values are 'http', 'https', 'ftp' and 'none'.
  422. Specify 'none' to disable this feature.
  423. Default: 'none'
  424. *--metalink-enable-unique-protocol*='true'|'false'::
  425. If 'true' is given and several protocols are available for a mirror in a
  426. metalink file, aria2 uses one of them.
  427. Use *--metalink-preferred-protocol* option to specify the preference of
  428. protocol.
  429. Default: 'true'
  430. XML-RPC Options
  431. ~~~~~~~~~~~~~~~
  432. *--enable-xml-rpc*[='true'|'false']::
  433. Enable XML-RPC server. It is strongly recommended to set username
  434. and password using *--xml-rpc-user* and *--xml-rpc-passwd*
  435. option. See also *--xml-rpc-listen-port* option. Default: 'false'
  436. *--xml-rpc-listen-port*=PORT::
  437. Specify a port number for XML-RPC server to listen to. Possible
  438. Values: '1024'-'65535' Default: '6800'
  439. *--xml-rpc-passwd*=PASSWD::
  440. Set XML-RPC password.
  441. *--xml-rpc-user*=USER::
  442. Set XML-RPC user.
  443. Advanced Options
  444. ~~~~~~~~~~~~~~~~
  445. *--allow-overwrite*='true'|'false'::
  446. If 'false' is given, aria2 doesn't download a file which already exists but
  447. the corresponding .aria2 file doesn't exist.
  448. In HTTP(S)/FTP download, if *--auto-file-renaming*='true' then,
  449. file name will be renamed. See *--auto-file-renaming* for details.
  450. Default: 'false'
  451. *--allow-piece-length-change*='true'|'false'::
  452. If false is given, aria2 aborts download when a piece length is different
  453. from one in a control file.
  454. If true is given, you can proceed but some download progress will be lost.
  455. Default: 'false'
  456. *--async-dns*[='true'|'false']::
  457. Enable asynchronous DNS.
  458. Default: 'true'
  459. *--auto-file-renaming*[='true'|'false']::
  460. Rename file name if the same file already exists.
  461. This option works only in HTTP(S)/FTP download.
  462. The new file name has a dot and a number(1..9999) appended.
  463. Default: 'true'
  464. *--auto-save-interval*=SEC::
  465. Save a control file(*.aria2) every SEC seconds.
  466. If '0' is given, a control file is not saved during download. aria2 saves a
  467. control file when it stops regardless of the value.
  468. The possible values are between '0' to '600'.
  469. Default: '60'
  470. *--conf-path*=PATH::
  471. Change the configuration file path to PATH.
  472. Default: '$HOME/.aria2/aria2.conf'
  473. *-D*, *--daemon*::
  474. Run as daemon.
  475. *--enable-direct-io*[='true'|'false']::
  476. Enable directI/O, which lowers cpu usage while allocating/checking files.
  477. Turn off if you encounter any error.
  478. Default: 'true'
  479. *--event-poll*=POLL::
  480. Specify the method for polling events. The possible Values are
  481. 'epoll' and 'select'. If you use recent Linux that has epoll, then
  482. the default value is 'epoll'. Otherwise, the default value is
  483. 'select'.
  484. *--file-allocation*=METHOD::
  485. Specify file allocation method.
  486. 'none' doesn't pre-allocate file space. 'prealloc' pre-allocates file space
  487. before download begins. This may take some time depending on the size of the
  488. file.
  489. If you are using newer file systems such as ext4
  490. (with extents support), btrfs or xfs, 'falloc' is
  491. your best choice. It allocates large(few GiB)
  492. files almost instantly. Don't use 'falloc' with
  493. legacy file systems such as ext3 because it takes
  494. almost same time as 'prealloc' and it blocks aria2
  495. entirely until allocation finishes. 'falloc' may
  496. not be available if your system doesn't have
  497. *posix_fallocate*() function.
  498. Possible Values: 'none', 'prealloc', 'falloc'
  499. Default: 'prealloc'
  500. *--log-level*=LEVEL::
  501. Set log level to output.
  502. LEVEL is either 'debug', 'info', 'notice', 'warn' or 'error'.
  503. Default: 'debug'
  504. *--on-download-complete*=COMMAND::
  505. Set the command to be executed when download completes. See
  506. *--on-download-start* option for the requirement of COMMAND. See
  507. also *--on-download-stop* option. Possible Values:
  508. '/path/to/command'
  509. *--on-download-error*=COMMAND::
  510. Set the command to be executed when download aborts due to error.
  511. See *--on-download-start* option for the requirement of COMMAND.
  512. See also *--on-download-stop* option. Possible Values:
  513. '/path/to/command'
  514. *--on-download-start*=COMMAND::
  515. Set the command to be executed when download starts up. COMMAND must
  516. take just one argument and GID is passed to COMMAND as a first
  517. argument. Possible Values: '/path/to/command'
  518. *--on-download-stop*=COMMAND::
  519. Set the command to be executed when download stops. You can override
  520. the command to be executed for particular download result using
  521. *--on-download-complete* and *--on-download-error*. If they are
  522. specified, command specified in this option is not executed. See
  523. *--on-download-start* option for the requirement of COMMAND.
  524. Possible Values: '/path/to/command'
  525. *--summary-interval*=SEC::
  526. Set interval in seconds to output download progress summary.
  527. Setting '0' suppresses the output.
  528. Default: '60'
  529. [NOTE]
  530. In multi file torrent downloads, the files adjacent forward to the specified files
  531. are also allocated if they share the same piece.
  532. *-Z*, *--force-sequential*[='true'|'false']::
  533. Fetch URIs in the command-line sequentially and download each URI in a
  534. separate session, like the usual command-line download utilities.
  535. Default: 'false'
  536. *--max-overall-download-limit*=SPEED::
  537. Set max overall download speed in bytes/sec. '0' means
  538. unrestricted. You can append 'K' or 'M'(1K = 1024, 1M = 1024K). To
  539. limit the download speed per download, use *--max-download-limit*
  540. option. Default: '0'
  541. *--max-download-limit*=SPEED::
  542. Set max download speed per each download in bytes/sec. '0' means
  543. unrestricted. You can append 'K' or 'M'(1K = 1024, 1M = 1024K). To
  544. limit the overall download speed, use *--max-overall-download-limit*
  545. option. Default: '0'
  546. *--no-conf*::
  547. Disable loading aria2.conf file.
  548. *--no-file-allocation-limit*=SIZE::
  549. No file allocation is made for files whose size is smaller than SIZE.
  550. You can append 'K' or 'M'(1K = 1024, 1M = 1024K).
  551. Default: '5M'
  552. *-P*, *--parameterized-uri*[='true'|'false']::
  553. Enable parameterized URI support.
  554. You can specify set of parts: 'http://{sv1,sv2,sv3}/foo.iso'.
  555. Also you can specify numeric sequences with step counter:
  556. '\http://host/image[000-100:2].img'.
  557. A step counter can be omitted.
  558. If all URIs do not point to the same file, such as the second example above,
  559. -Z option is required.
  560. Default: 'false'
  561. *-q*, *--quiet*[='true'|'false']::
  562. Make aria2 quiet (no console output).
  563. Default: 'false'
  564. *--realtime-chunk-checksum*='true'|'false'::
  565. Validate chunk of data by calculating checksum while downloading a file if
  566. chunk checksums are provided.
  567. Default: 'true'
  568. *--stop*=SEC::
  569. Stop application after SEC seconds has passed.
  570. If '0' is given, this feature is disabled.
  571. Default: '0'
  572. *-v*, *--version*::
  573. Print the version number, copyright and the configuration information and
  574. exit.
  575. Options That Take An Optional Argument
  576. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  577. The options that have its argument surrounded by square brackets([])
  578. take an optional argument. Usually omiting the argument is evaluated to 'true'.
  579. If you use short form of these options(such as '-V') and give
  580. an argument, then the option name and its argument should be concatenated(e.g.
  581. '-Vfalse'). If any spaces are inserted between the option name and the argument,
  582. the argument will be treated as URI and usually this is not what you expect.
  583. URL, TORRENT_FILE, METALINK_FILE
  584. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  585. You can specify multiple URLs in command-line.
  586. Unless you specify *-Z* option, all URLs must point to the same file or downloading will fail.
  587. You can also specify arbitrary number of torrent files and metalink files
  588. stored on a local drive. Please note that they are always treated as a
  589. separate download.
  590. You can specify both torrent file with -T option and URLs. By doing this,
  591. you can download a file from both torrent swarm and HTTP(S)/FTP server at the same time,
  592. while the data from HTTP(S)/FTP are uploaded to the torrent swarm. Note that
  593. only single file torrent can be integrated with HTTP(S)/FTP.
  594. [NOTE]
  595. Make sure that URL is quoted with single(') or double(") quotation if it
  596. contains "&" or any characters that have special meaning in shell.
  597. Resuming Download
  598. ~~~~~~~~~~~~~~~~~
  599. Usually, you can resume transfer by just issuing same command(aria2c
  600. URL) if the previous transfer is made by aria2.
  601. If the previous transfer is made by a browser or wget like sequential
  602. download manager, then use -c option to continue the transfer(aria2c
  603. *-c* URL).
  604. EXIT STATUS
  605. -----------
  606. Because aria2 can handle multiple downloads at once, it encounters
  607. lots of errors in a session. aria2 returns the following exit status
  608. based on the last error encountered.
  609. *0*::
  610. If all downloads are successful.
  611. *1*::
  612. If an unknown error occurs.
  613. *2*::
  614. If time out occurs.
  615. *3*::
  616. If a resource is not found.
  617. *4*::
  618. If aria2 sees the specfied number of "resource not found" error.
  619. See *--max-file-not-found* option).
  620. *5*::
  621. If a download aborts because download speed is too slow.
  622. See *--lowest-speed-limit* option)
  623. *6*::
  624. If network problem occurs.
  625. *7*::
  626. If there are unfinished downloads. This error is only reported if
  627. all finished downloads are successful and there are unfinished
  628. downloads in a queue when aria2 exits by pressing Ctrl-C by an user
  629. or sending TERM or INT signal.
  630. [NOTE]
  631. An error occurred in a finished download will not be reported
  632. as exit status.
  633. ENVIRONMENT
  634. -----------
  635. aria2 recognizes the following environment variables.
  636. http_proxy [\http://][USER:PASSWORD@]HOST[:PORT]::
  637. Specify proxy server for use in HTTP.
  638. Overrides http-proxy value in configuration file.
  639. The command-line option *--http-proxy* overrides this value.
  640. https_proxy [\http://][USER:PASSWORD@]HOST[:PORT]::
  641. Specify proxy server for use in HTTPS.
  642. Overrides https-proxy value in configuration file.
  643. The command-line option *--https-proxy* overrides this value.
  644. ftp_proxy [\http://][USER:PASSWORD@]HOST[:PORT]::
  645. Specify proxy server for use in FTP.
  646. Overrides ftp-proxy value in configuration file.
  647. The command-line option *--ftp-proxy* overrides this value.
  648. all_proxy [\http://][USER:PASSWORD@]HOST[:PORT]::
  649. Specify proxy server for use if no protocol-specific proxy is specified.
  650. Overrides all-proxy value in configuration file.
  651. The command-line option *--all-proxy* overrides this value.
  652. no_proxy [DOMAIN,...]::
  653. Specify comma-separated hostname or domains to which proxy should not be used.
  654. Overrides no-proxy value in configuration file.
  655. The command-line option *--no-proxy* overrides this value.
  656. FILES
  657. -----
  658. aria2.conf
  659. ~~~~~~~~~~
  660. By default, aria2 parses '$HOME/.aria2/aria2.conf' as a configuraiton
  661. file. You can specify the path to configuration file using
  662. *--conf-path* option. If you don't want to use the configuraitonf
  663. file, use *--no-conf* option.
  664. The configuration file is a text file and has 1 option per each
  665. line. In each line, you can specify name-value pair in the format:
  666. NAME=VALUE, where name is the long command-line option name without
  667. "--" prefix. You can use same syntax for the command-line option. The
  668. lines beginning "#" are treated as comments.
  669. --------------------------------------
  670. # sample configuration file for aria2c
  671. listen-port=60000
  672. dht-listen-port=60000
  673. seed-ratio=1.0
  674. max-upload-limit=50K
  675. ftp-pasv=true
  676. --------------------------------------
  677. dht.dat
  678. ~~~~~~~~
  679. By default, the routing table of DHT is saved to the path $HOME/.aria2/dht.dat.
  680. Control File
  681. ~~~~~~~~~~~~
  682. aria2 uses a control file to track the progress of a download. A
  683. control file is placed in the same directory as the downloading file
  684. and its filename is the filename of downloading file with ".aria2"
  685. appended. For example, if you are downloading file.zip, then the
  686. control file should be file.zip.aria2. (There is a exception for this
  687. naming convention. If you are downloading a multi torrent, its
  688. control file is the "top directory" name of the torrent with ".aria2"
  689. appended. The "top directory" name is a value of "name" key in "info"
  690. directory in a torrent file.)
  691. Usually a control file is deleted once download completed. If aria2
  692. decides that download cannot be resumed(for example, when downloading
  693. a file from a HTTP server which doesn't support resume), a control
  694. file is not created.
  695. Normally if you lose a control file, you cannot resume download. But
  696. if you have a torrent or metalink with chunk checksums for the file,
  697. you can resume the download without a control file by giving -V option
  698. to aria2c in command-line.
  699. Input File
  700. ~~~~~~~~~~
  701. The input file can contain a list of URIs for aria2 to download. You
  702. can specify multiple URIs for a single entity: separate URIs on a
  703. single line using the TAB character.
  704. Each line is treated as if it is provided in command-line argument.
  705. Therefore they are affected by *-Z* and *-P* options.
  706. Additionally, the following options can be specified after each line
  707. of URIs. These optional lines must start with white space(s).
  708. * dir
  709. * check-integrity
  710. * continue
  711. * all-proxy
  712. * connect-timeout
  713. * dry-run
  714. * lowest-speed-limit
  715. * max-file-not-found
  716. * max-tries
  717. * no-proxy
  718. * out
  719. * proxy-method
  720. * remote-time
  721. * retry-wait
  722. * split
  723. * timeout
  724. * http-auth-challenge
  725. * http-user
  726. * http-passwd
  727. * http-proxy
  728. * https-proxy
  729. * referer
  730. * enable-http-keep-alive
  731. * enable-http-pipelining
  732. * header
  733. * use-head
  734. * user-agent
  735. * ftp-user
  736. * ftp-passwd
  737. * ftp-pasv
  738. * ftp-proxy
  739. * ftp-type
  740. * ftp-reuse-connection
  741. * no-netrc
  742. * select-file
  743. * bt-external-ip
  744. * bt-hash-check-seed
  745. * bt-max-open-files
  746. * bt-max-peers
  747. * bt-min-crypto-level
  748. * bt-require-crypto
  749. * bt-request-peer-speed-limit
  750. * bt-seed-unverified
  751. * bt-tracker-interval
  752. * enable-peer-exchange
  753. * follow-torrent
  754. * index-out
  755. * max-upload-limit
  756. * peer-id-prefix
  757. * seed-ratio
  758. * seed-time
  759. * follow-metalink
  760. * metalink-servers
  761. * metalink-language
  762. * metalink-location
  763. * metalink-os
  764. * metalink-version
  765. * metalink-preferred-protocol
  766. * metalink-enable-unique-protocol
  767. * allow-overwrite
  768. * allow-piece-length-change
  769. * async-dns
  770. * auto-file-renaming
  771. * file-allocation
  772. * max-download-limit
  773. * no-file-allocation-limit
  774. * parameterized-uri
  775. * realtime-chunk-checksum
  776. These options have exactly same meaning of the ones in the
  777. command-line options, but it just applies to the URIs it belongs to.
  778. For example, the content of uri.txt is
  779. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  780. http://server/file.iso http://mirror/file.iso
  781. dir=/iso_images
  782. out=file.img
  783. http://foo/bar
  784. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  785. If aria2 is executed with *-i* uri.txt *-d* /tmp options, then
  786. 'file.iso' is saved as '/iso_images/file.img' and it is downloaded
  787. from \http://server/file.iso and \http://mirror/file.iso. The file
  788. 'bar' is downloaded from \http://foo/bar and saved as '/tmp/bar'.
  789. In some cases, *out* parameter has no effect. See note of *--out*
  790. option for the restrictions.
  791. Server Performance Profile
  792. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  793. This section describes the format of server performance profile. The
  794. file is plain text and each line has several NAME=VALUE pair,
  795. delimited by comma. Currently following NAMEs are recognized:
  796. host::
  797. Hostname of the server. Required.
  798. protocol::
  799. Protocol for this profile, such as ftp, http. Required.
  800. dl_speed::
  801. The average download speed observed in the previous download in
  802. bytes per sec. Required.
  803. sc_avg_speed::
  804. The average download speed observed in the previous download in
  805. bytes per sec. This value is only updated if the download is done in
  806. single connection environment and only used by
  807. AdaptiveURISelector. Optional.
  808. mc_avg_speed::
  809. The average download speed observed in the previous download in
  810. bytes per sec. This value is only updated if the download is done in
  811. multi connection environment and only used by
  812. AdaptiveURISelector. Optional.
  813. counter::
  814. How many times the server is used. Currently this value is only used
  815. by AdaptiveURISelector. Optional.
  816. last_updated::
  817. Last contact time in GMT with this server, specified in the seconds
  818. from the Epoch. Required.
  819. status::
  820. ERROR is set when server cannot be reached or out-of-service or
  821. timeout occurred. Otherwise, OK is set.
  822. Those fields must exist in one line. The order of the fields is not
  823. significant. You can put pairs other than the above; they are simply
  824. ignored.
  825. An example follows:
  826. --------------------------------------------------------------------------------
  827. host=localhost, protocol=http, dl_speed=32000, last_updated=1222491640, status=OK
  828. host=localhost, protocol=ftp, dl_speed=0, last_updated=1222491632, status=ERROR
  829. --------------------------------------------------------------------------------
  830. EXAMPLE
  831. -------
  832. HTTP/FTP Segmented Download
  833. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  834. Download a file
  835. ^^^^^^^^^^^^^^^
  836. --------------------------------
  837. aria2c "http://host/file.zip"
  838. --------------------------------
  839. [NOTE]
  840. aria2 uses 5 connections to download 1 file by default.
  841. Download a file using 1 connection
  842. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  843. ----------------------------------
  844. aria2c -s1 "http://host/file.zip"
  845. ----------------------------------
  846. [NOTE]
  847. aria2 uses 5 connections to download 1 file by default.
  848. -s1 limits the number of connections to just 1.
  849. [NOTE]
  850. To pause a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory. You can change URLs as long as they are pointing to the same file.
  851. Download a file from 2 different HTTP servers
  852. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  853. ------------------------------------------------------
  854. aria2c "http://host/file.zip" "http://mirror/file.zip"
  855. ------------------------------------------------------
  856. Download a file from HTTP and FTP servers
  857. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  858. -----------------------------------------------------
  859. aria2c "http://host1/file.zip" "ftp://host2/file.zip"
  860. -----------------------------------------------------
  861. Download files listed in a text file concurrently
  862. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  863. ------------------------
  864. aria2c -ifiles.txt -j2
  865. ------------------------
  866. [NOTE]
  867. -j option specifies the number of parallel downloads.
  868. Using proxy
  869. ^^^^^^^^^^^
  870. For HTTP:
  871. ----------------------------------------------------------
  872. aria2c --http-proxy="http://proxy:8080" "http://host/file"
  873. ----------------------------------------------------------
  874. For FTP:
  875. --------------------------------------------------------
  876. aria2c --ftp-proxy="http://proxy:8080" "ftp://host/file"
  877. --------------------------------------------------------
  878. [NOTE]
  879. See *--http-proxy*, *--https-proxy*, *--ftp-proxy* and *--all-proxy* for
  880. details.
  881. You can specify proxy in the environment variables. See *ENVIRONMENT* section.
  882. Proxy with authorization
  883. ^^^^^^^^^^^^^^^^^^^^^^^^
  884. ----------------------------------------------------------------------------
  885. aria2c --http-proxy="http://username:password@proxy:8080" "http://host/file"
  886. ----------------------------------------------------------------------------
  887. Metalink Download
  888. ~~~~~~~~~~~~~~~~~
  889. Download files with remote Metalink
  890. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  891. --------------------------------------------------------
  892. aria2c --follow-metalink=mem "http://host/file.metalink"
  893. --------------------------------------------------------
  894. Download using a local metalink file
  895. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  896. ----------------------------------------------------------
  897. aria2c -p --lowest-speed-limit=4000 file.metalink
  898. ----------------------------------------------------------
  899. [NOTE]
  900. To pause a download, press Ctrl-C.
  901. You can resume the transfer by running aria2c with the same argument in the same
  902. directory.
  903. Download several local metalink files
  904. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  905. ----------------------------------------
  906. aria2c -j2 file1.metalink file2.metalink
  907. ----------------------------------------
  908. Download only selected files using index
  909. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  910. -------------------------------------------
  911. aria2c --select-file=1-4,8 file.metalink
  912. -------------------------------------------
  913. [NOTE]
  914. The index is printed to the console using -S option.
  915. Download a file using a local .metalink file with user preference
  916. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  917. ------------------------------------------------------------------------------
  918. aria2c --metalink-location=JP,US --metalink-version=1.1 --metalink-language=en-US file.metalink
  919. ------------------------------------------------------------------------------
  920. BitTorrent Download
  921. ~~~~~~~~~~~~~~~~~~~
  922. Download files from remote BitTorrent file
  923. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  924. ------------------------------------------------------
  925. aria2c --follow-torrent=mem "http://host/file.torrent"
  926. ------------------------------------------------------
  927. Download using a local torrent file
  928. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  929. ---------------------------------------------
  930. aria2c --max-upload-limit=40K file.torrent
  931. ---------------------------------------------
  932. [NOTE]
  933. --max-upload-limit specifies the max of upload rate.
  934. [NOTE]
  935. To pause a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory.
  936. Download 2 torrents
  937. ^^^^^^^^^^^^^^^^^^^
  938. --------------------------------------
  939. aria2c -j2 file1.torrent file2.torrent
  940. --------------------------------------
  941. Download a file using torrent and HTTP/FTP server
  942. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  943. ------------------------------------------------------------
  944. aria2c -Ttest.torrent "http://host1/file" "ftp://host2/file"
  945. ------------------------------------------------------------
  946. [NOTE]
  947. Downloading multi file torrent with HTTP/FTP is not supported.
  948. Download only selected files using index(usually called "selectable download")
  949. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  950. ---------------------------------------
  951. aria2c --select-file=1-4,8 file.torrent
  952. ---------------------------------------
  953. [NOTE]
  954. The index is printed to the console using -S option.
  955. Specify output filename
  956. ^^^^^^^^^^^^^^^^^^^^^^^
  957. To specify output filename for BitTorrent downloads, you need to know
  958. the index of file in torrent file using *-S* option. For example, the
  959. output looks like this:
  960. --------------------------
  961. idx|path/length
  962. ===+======================
  963. 1|dist/base-2.6.18.iso
  964. |99.9MiB
  965. ---+----------------------
  966. 2|dist/driver-2.6.18.iso
  967. |169.0MiB
  968. ---+----------------------
  969. --------------------------
  970. To save 'dist/base-2.6.18.iso' in '/tmp/mydir/base.iso' and
  971. 'dist/driver-2.6.18.iso' in '/tmp/dir/driver.iso', use the following
  972. command:
  973. -----------------------------------------------------------------------------------------
  974. aria2c --dir=/tmp --index-out=1=mydir/base.iso --index-out=2=dir/driver.iso file.torrent
  975. -----------------------------------------------------------------------------------------
  976. Change the listening port for incoming peer
  977. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  978. ---------------------------------------------------
  979. aria2c --listen-port=7000-7001,8000 file.torrent
  980. ---------------------------------------------------
  981. [NOTE]
  982. Since aria2 doesn't configure firewall or router for port forwarding, it's up
  983. to you to do it manually.
  984. Specify the condition to stop program after torrent download finished
  985. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  986. -------------------------------------------------------
  987. aria2c --seed-time=120 --seed-ratio=1.0 file.torrent
  988. -------------------------------------------------------
  989. [NOTE]
  990. In the above example, the program exits when the 120 minutes has elapsed since download completed or seed ratio reaches 1.0.
  991. Throttle upload speed
  992. ^^^^^^^^^^^^^^^^^^^^^
  993. ----------------------------------------------
  994. aria2c --max-upload-limit=100K file.torrent
  995. ----------------------------------------------
  996. Enable DHT
  997. ^^^^^^^^^^
  998. ---------------------------------------------------------
  999. aria2c --enable-dht --dht-listen-port=6881 file.torrent
  1000. ---------------------------------------------------------
  1001. [NOTE]
  1002. DHT uses udp port. Since aria2 doesn't configure firewall or router for port
  1003. forwarding, it's up to you to do it manually.
  1004. More advanced HTTP features
  1005. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1006. Load cookies
  1007. ^^^^^^^^^^^^
  1008. --------------------------------------------------------
  1009. aria2c --load-cookies=cookies.txt "http://host/file.zip"
  1010. --------------------------------------------------------
  1011. [NOTE]
  1012. You can use Firefox/Mozilla's cookie file without modification.
  1013. Resume download started by web browsers or another programs
  1014. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1015. -------------------------------------------------------
  1016. aria2c -c -s2 "http://host/partiallydownloadedfile.zip"
  1017. -------------------------------------------------------
  1018. Client certificate authorization for SSL/TLS
  1019. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1020. ------------------------------------------------------------------------------------------
  1021. aria2c --certificate=/path/to/mycert.pem --private-key=/path/to/mykey.pem https://host/file
  1022. ------------------------------------------------------------------------------------------
  1023. [NOTE]
  1024. The file specified in *--private-key* must be decrypted. The behavior when
  1025. encrypted one is given is undefined.
  1026. Verify peer in SSL/TLS using given CA certificates
  1027. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1028. ------------------------------------------------------------------------------------------
  1029. aria2c --ca-certificate=/path/to/ca-certificates.crt --check-certificate https://host/file
  1030. ------------------------------------------------------------------------------------------
  1031. And more advanced features
  1032. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1033. Throttle download speed
  1034. ^^^^^^^^^^^^^^^^^^^^^^^
  1035. -------------------------------------------------
  1036. aria2c --max-download-limit=100K file.metalink
  1037. -------------------------------------------------
  1038. Repair a damaged download using -V option
  1039. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1040. -----------------------
  1041. aria2c -V file.metalink
  1042. -----------------------
  1043. [NOTE]
  1044. This option is only available used with BitTorrent or metalink with chunk
  1045. checksums.
  1046. Drop connection if download speed is lower than specified value
  1047. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1048. ------------------------------------------------
  1049. aria2c --lowest-speed-limit=10K file.metalink
  1050. ------------------------------------------------
  1051. Parameterized URI support
  1052. ^^^^^^^^^^^^^^^^^^^^^^^^^
  1053. You can specify set of parts:
  1054. -----------------------------------------------
  1055. aria2c -P "http://{host1,host2,host3}/file.iso"
  1056. -----------------------------------------------
  1057. You can specify numeric sequence:
  1058. ---------------------------------------------
  1059. aria2c -Z -P "http://host/image[000-100].png"
  1060. ---------------------------------------------
  1061. [NOTE]
  1062. -Z option is required if the all URIs don't point to the same file, such as the above example.
  1063. You can specify step counter:
  1064. -------------------------------------------
  1065. aria2c -Z -P "http://host/image[A-Z:2].png"
  1066. -------------------------------------------
  1067. Parallel downloads of arbitrary number of URL,metalink,torrent
  1068. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1069. --------------------------------------------------------------
  1070. aria2c -j3 -Z "http://host/file1" file2.torrent file3.metalink
  1071. --------------------------------------------------------------
  1072. BitTorrent Encryption
  1073. ^^^^^^^^^^^^^^^^^^^^^
  1074. Encrypt whole payload using ARC4:
  1075. -------------------------------------------------------------------------
  1076. aria2c --bt-min-crypto-level=arc4 --bt-require-crypto=true file.torrent
  1077. -------------------------------------------------------------------------
  1078. SEE ALSO
  1079. --------
  1080. Project Web Site: http://aria2.sourceforge.net/
  1081. aria2 Wiki: http://apps.sourceforge.net/trac/aria2/wiki
  1082. Metalink Homepage: http://www.metalinker.org/
  1083. COPYRIGHT
  1084. ---------
  1085. Copyright (C) 2006, 2009 Tatsuhiro Tsujikawa
  1086. This program is free software; you can redistribute it and/or modify
  1087. it under the terms of the GNU General Public License as published by
  1088. the Free Software Foundation; either version 2 of the License, or
  1089. (at your option) any later version.
  1090. This program is distributed in the hope that it will be useful,
  1091. but WITHOUT ANY WARRANTY; without even the implied warranty of
  1092. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1093. GNU General Public License for more details.
  1094. You should have received a copy of the GNU General Public License
  1095. along with this program; if not, write to the Free Software
  1096. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  1097. In addition, as a special exception, the copyright holders give
  1098. permission to link the code of portions of this program with the
  1099. OpenSSL library under certain conditions as described in each
  1100. individual source file, and distribute linked combinations
  1101. including the two.
  1102. You must obey the GNU General Public License in all respects
  1103. for all of the code used other than OpenSSL. If you modify
  1104. file(s) with this exception, you may extend this exception to your
  1105. version of the file(s), but you are not obligated to do so. If you
  1106. do not wish to do so, delete this exception statement from your
  1107. version. If you delete this exception statement from all source
  1108. files in the program, then also delete it here.