Or how to use up a lot of disk space real quick…!
I used the following command to create a local copy of all the files needed to install the 32-bit version of Cygwin (with out the source code) onto my hard disk as I wanted to install it on an old machine that I don’t connect to the internet.
The command is broken into three lines with a continuation character at the end of the first two lines.
- Line 1 – Invokes wget
Instructs wget to create a directory structure that mirrors the source.
- ‑‑reject '*‑src.tar*' (optional)
Tells wget not to download any files that match '*‑src.tar*', which in this case will exclude any source packages. To only download one type of file use ‑‑accept instead of ‑‑reject.
Be less verbose which causes wget to just print out the URL and path name of each file downloaded.
- Line 2 – The URL where the files should be downloaded from.
- Line 3 (optional) – Tries to make wget behave nicely..
- ‑w 5
Causes wget to wait (for five seconds) between each download.
Makes the actual length of the wait a random number of seconds between 0.5 and 1.5 times the specified delay.
Tell wget to attempt to limit the bandwidth used.
- ‑w 5