aria2c.1.txt 40 KB

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