If you work on multiple remote linux servers then you may need to download multiple files. The utility which is used to download files from the command line is called wget. In order to download a file from the command line using the wget command we would use the following command;

wget URL

replace ‘URL’ with the exact url of the file to download.

wget https://g33kinfo.com/info/wp-content/uploads/2009/11/tinychat_code.png

If you want to download multiple files, it is not efficient to run the above command for each file that you want to download. In order to download multiple files, simply create a file and put all the urls in that file.

touch filename
vim filename

insert the file locations in the file and then save and close the file.


wget filename

wget will use this file as a parameter for downloading the selected files to the current directory. The following wget command will download the multiple files as per your given setting, in this file.

wget –i filename

Was this post helpful?