Wget: Linux File downloader

Photo by Jess Bailey on Unsplash

Wget: Linux File downloader

The Linux comes with many command-line tools, one of the important ones is Wget which provides networking functionality like Https, Http, Ftp, etc protocol. With wget we can download files from the internet to the local system.

wget https://go.dev/dl/go1.20.3.darwin-amd64.pkg

The above command will download the go-installer zip to the current directory, to have a different name compared to the server pass -O flag.

wget -O go-installer https://go.dev/dl/go1.20.3.darwin-amd64.pkg

To download multiple files, there are 2 steps.

Step-1 create a new images.txt file, add the following urls.

https://cdn.pixabay.com/photo/2016/12/13/05/15/puppy-1903313__340.jpg
https://cdn.pixabay.com/photo/2016/01/05/17/51/maltese-1123016__340.jpg
https://cdn.pixabay.com/photo/2020/06/30/22/34/dog-5357794__340.jpg
wget -i images.txt
puppy340.jpg 100%[=========================>]  26.44K  93.0KB/s    in 0.3s    
maltea34.jpg 100%[=========================>]  50.81K  --.-KB/s    in 0.06s   
dog-557.jpg  100%[=========================>]  30.59K  --.-KB/s    in 0.07s

To send the output to the terminal wget -O- [ REST URL ] us the following syntax.