Search This Blog

Friday, July 20, 2018

Wget

GNU Wget is a free utility for non-interactive download of files from the Web.
It supports HTTP, HTTPS, and FTP protocols, as well as retrievalthrough HTTP proxies.

Wget has been designed for robustness over slow or unstable connections; if a download fails it will keep retrying until the whole file has  been retrieved. If the server supports regetting, it will instruct the server to continue the download from whereit left off.

[Example]

wget http://foo[.]com/bar[.]mp4
Downlaod bar.mp4 in current directory.

wget -i urls.txt

Iterate through urls in file urls.txt.

wget -nc http://foo[.]com/bar[.]mp4
Download bar.mp4 only if it is not available in current directory.


wget -O tmp[.]mp4 http://foo[.]com/bar[.]mp4

Download bar.mp4 as tmp.mp4 in current directory.



[Options]

-i : Read URLs from a local or external file.
-nc : Do not retrieve file if it already exists in current folder.
-O : Save output as.