Professional Documents
Culture Documents
• Linux Tricks
• Best Linux Tools
• Certifications
• Guides
• Monitoring Tools
• Linux Commands
• 1
2. Download a File
If you want to download a file, you can use curl with the -O or -o options. The former will save
the file in the current working directory with the same name as in the remote location, whereas the
latter allows you to specify a different filename and/or location.
$ curl -O http://yourdomain.com/yourfile.tar.gz # Save as yourfile.tar.gz
$ curl -o newfile.tar.gz http://yourdomain.com/yourfile.tar.gz # Save as
newfile.tar.gz
where you can skip -U user:password if your proxy does not require authentication.
You can use this tip to simulate the behavior of a regular HTML form.
where you can skip -u username:password if the FTP server allows anonymous logins.