vertevero
vertevero

Reputation: 85

Mirroring with regex in wget

I'm using wget and trying to mirror all 98 folders on a website. What would be the syntax to do "wget -mk http://example.com/folder[1-98]/"?

Thanks.

Upvotes: 0

Views: 723

Answers (3)

Nu2Overflow
Nu2Overflow

Reputation: 699

You can apply {} to apply range of numbers. Use this example "wget -mk http://example.com/folder{1..98}"

Upvotes: 0

Timofey Stolbov
Timofey Stolbov

Reputation: 4621

for i in $(seq 1 98);do echo "http://example.com/folder${i}/";done|wget -mki -

Upvotes: 3

Femi
Femi

Reputation: 64700

wget does not support specifying URL ranges in the format you've described. You would be better served building out the range of links with bash or some other programming language into a text file and then reading that text file with wget.

Upvotes: 0

Related Questions