Expertise level: Easy
If you have to download a file from the shell using a URL, follow these steps:
- Login with SSH as root.
- Navigate to the directory where you want to download the file using cd command:
- Type the following command:
(For example, the file to be downloaded is at http://domain.com/file.txt)
The file.txt file will then be on the server into the directory: /path/to/directory/
If you wish to download a file and save it with a different name, you can use the -O flag:
wget -O /path/to/place/file/file2.txt http://domain.com/file.txt
In this example, file.txt will be copied to file2.txt.
For more information, please consult the official documentation: http://www.gnu.org/software/wget/manual/wget.html