There are two ways you can do this using Curl.
In this first method you would the
-O flag to write out the file based on the remote name from the URL; in this case it would most likely write the file out to the system as
IMAGENAME.ISO?md5=hUhpyFjk7zEskw06ZhrWAQ&expires=1454811899; note how the URL value is contained by double quotes since
? might be misinterpreted as Bash commands:
curl -O -L "http://some.ip.in.here/website.com/IMAGENAME.ISO?md5=hUhpyFjk7zEskw06ZhrWAQ&expires=1454811899";
While that method technically “works” but the filename is confusing at best. So in this other method you would use output redirection—with
> followed by a filename after the URL—to output the file contents to a file named
curl -L "http://some.ip.in.here/website.com/IMAGENAME.ISO?md5=hUhpyFjk7zEskw06ZhrWAQ&expires=1454811899" > "IMAGENAME.ISO";
So if you ask me, the second method works best for most average use. Also notice the
-L flag being used in both commands; that commands tells Curl to follow any redirection links that a file download URL might have since a lot of times files on download services redirect a few times before landing at the destination payload file.