Commands.page Logo

Wget Option to Wait Between Requests on Ubuntu

This article outlines how to configure the wget utility in Ubuntu to pause between downloads. You will learn the specific command-line flag required to set a delay time, ensuring you do not overwhelm servers during multiple file retrievals.

The Specific Option

The option that allows wget to wait a specific amount of time between requests is --wait. You can also use the shorthand -w. This command tells wget to sleep for a specified number of seconds after completing each download before initiating the next one.

How to Use It

To use this feature, append the flag followed by the number of seconds to your command. The syntax is straightforward:

wget --wait=seconds [URL]

For example, to wait 10 seconds between requests, execute:

wget --wait=10 http://example.com/file1.zip http://example.com/file2.zip

Randomizing the Delay

For more advanced usage, you can combine --wait with --random-wait. This sets the wait time to a random value between 0.5 and 1.5 times the specified seconds. This helps mimic human browsing patterns.

wget --wait=5 --random-wait http://example.com/file1.zip

Using these options ensures responsible downloading practices while managing bandwidth and server load on Ubuntu systems.