Get a web page and store in a local file, make the local file get the name of the remote document (if no file name part is specified in the URL, this will fail): curl -O http://www.netscape.com/index.html Fetch two files and store them with their remote names: curl -O www.haxx.se/index.html -O curl.haxx.se/download.html