Skip to content
Advertisement

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:

JavaScript

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

JavaScript

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

Thank you.

Advertisement

Answer

You can just append more URLs to your command:

JavaScript

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

JavaScript

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:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement