Skip to main content

Download Files In Parallel

Published 1 min readMarkdown
Part of seriesProTips
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.

About the author

  • I work with Linux in the day, ballroom dancing at night. I use Arch, btw.

No comments yet. Be the first to comment.

More from this blog