How Do You Get the Curl Command to Work like wget when the URL Has a Forwarding 300 Series Return Code?

Problem scenario
You do not want to install wget on Linux.  You want curl to download a file from the internet.  How do you get curl to work through a forwarding request the same way wget natively works?

Solution
Use the "-L" flag.   For example:

curl -L www.continualintegration.com > /tmp/good.html

Leave a comment

Your email address will not be published. Required fields are marked *