Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
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

1 Answer 1

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
#!/bin/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

 
discard

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.