With curl
is possible do
curl http://somedomain.com/originalfilename.tar.gz -o newfilename.tar.gz
curl http://somedomain.com/originalfilename.tar.gz -o /other/path/newfilename.tar.gz
Therefore with -o
is possible rename the filename to download and even define other path directort to download
Now if I want keep the same filename is mandatory use -O
curl http://somedomain.com/originalfilename.tar.gz -O
Therefore is downloaded the originalfilename.tar.gz
file.
Now
Question
- How to download a file keeping its name (it with
-O
) and defining the directory to download?
Something like
curl http://somedomain.com/originalfilename.tar.gz -O <download to /some/path>
Therefore for Shell Scripting purposes, where the script can be executed in any place. I want download the originalfilename.tar.gz
file explicitly at /some/path