Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a gallery in the format:


How can I download them all using wget?

How can I make it wait 2 seconds between downloads?

i'm using bash ver 3.2.

share|improve this question
FYI, URLs use forward slashes (http://domain/), never backslashes. – grawity Sep 29 '11 at 11:42
up vote 2 down vote accepted

In bash:

for ((i=1; i<=500; i++)); do wget http://DOMAIN/file`printf "%04d" $i`.jpg; done

If you want to wait 2 seconds between downloads, add a sleep 2; before the done

share|improve this answer

Use ranges with {..}.

$ wget{0001..0543}.jpg

The above answer works with zsh and bash version 4 and above. See the answer posted by @w00t if you're using an older version of bash (bash -version to check).

enter image description here

share|improve this answer
That doesn't keep the starting 0s – w00t Sep 29 '11 at 9:58
Cool, didn't know that. Now for the long wait until all bashes are v4 :-) – w00t Sep 29 '11 at 11:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.