Linux: how to download multiple files in background


Step 1:
Install aria2

Step 2:
Create a new text file eg: dl.txt

http://tutorialspots.com/tutorialspots/1_360p.mp4
  file-allocation=none
  dir=/mnt/virtual/tutorialspots/
  max-connection-per-server=3
  split=3
http ://tutorialspots. com/tutorialspots/1_480p.mp4
  file-allocation=none
  dir=/mnt/virtual/tutorialspots/
  max-connection-per-server=3
  split=3

Note: link no space
This example for 2 files, you can use many files

Step 3:
Choose log file
/dev/null
or
/var/log/aria2.log
or

Step 4: use this command line

aria2c -c -i dl.txt -j4 > /dev/null 2>&1 &

Note: -j : max concurrent downloads, you can change yo your own
-c: Continue downloading a partially downloaded file

In case use file log, to see log you can use this command:

tail -f /var/log/aria2c.log

Leave a Reply