Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
alias download='while true; do timeout -s 9 1260 aria2c *.torrent --lowest-speed-limit=1024 --disable-ipv6=true --seed-time=0 --max-connection-per-server=6 --enable-rpc=false; sleep 1; done'
alias seed='aria2c --check-integrity=false --bt-seed-unverified=true --lowest-speed-limit=1024 --disable-ipv6=true --max-connection-per-server=6 -d . *.torrent --seed-time=999999 --seed-ratio=999999.0'

So I'm using these aliases with aria2 to download torrent files. Theres only 1 problem with this: how can I put the finished downloads in a directory? (using the "download" alias)

p.s.: the "while true..." in the "download" alias is there because the download "slows down"... after a while, and I need to restart aria2c :D

share|improve this question
up vote 3 down vote accepted

The p.s. strikes me as a bad idea given the way BT works*, but a proper event hook should do the trick:

Let's see an example of how arguments are passed to command:

$ cat hook.sh
echo "Called with [$1] [$2] [$3]"
$ aria2c --on-download-complete hook.sh http://example.org/file.iso
Called with [1] [1] [/path/to/file.iso]

The --seed-time and --seed-ratio options kind of automate many use-cases, too.

(* better check your settings and read up on BitTorrent)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.