Download Files In Parallel

This is a quick way to download files from different URLs in parallel.
List all URLs in a file urls.txt
https://example.com/file1.zip
https://example.com/file2.zip
https://example.com/file3.zip
https://example.com/file4.zip
One-liner download using wget
cat urls.txt | xargs -P 4 -n 1 wget
-P <max-procs> sets number of parallel processes. Use 0 for maximum.
One-liner download using wget
cat urls.txt | xargs -P 0 -n 1 curl -O
-P <max-procs> sets number of parallel processes. Use 0 for maximum.

