Skip to content

How to download multiple links into a folder via wget in linux

When I want to download a file in a folder in Linux via wget I use the following:

wget -P /patch/to/folder/

Now let’s say I want to download several files into the same folder and my urls are:

How can I achieve this in one with command in the same folder /patch/to/folder/?

Thank you.



You can just append more URLs to your command:

wget -P /patch/to/folder/

If they only differ by number, you can have bash brace expansion automatically generate all the arguments before wget runs:

wget -P /patch/to/folder/{1..3}.zip 

You can tell that this is possible from the invocation synopsis in man wget, where the ... is a convention that means it can accept multiple at a time:

   wget [option]... [URL]...
User contributions licensed under: CC BY-SA
4 People found this is helpful