Now let's look at the curl
program as it is somewhat similar to wget
. One of the main differences between wget
and curl
is how they handle the output.
The wget
program by default displays some progress information on the screen and then downloads the index.html
file. In contrast, curl
normally displays the file itself on the screen.
Here is an example of curl
running on my system using my favorite website (screenshot shortened to save space):
Another way to get the output into a file is by using redirection like this:
You will notice that when redirected to a file the transfer progress is displayed on the screen. Also note that any error output goes into the file if redirected and not the screen.