12 wget command examples in Linux/Unix
What is wget command? The ability to download content from the world wide web (the internet) and store it locally on your system is an important feature to have. The wget(Web get) command line utility is a freely available package which can be used to retrieve files from the web using HTTP, HTTPS, and FTP protocols. In addition to the mentioned protocols, wget can also be used to download files through HTTP proxies. This is similar to cURL command which we covered recently. One very useful feature of wget is that it is non-interactive and therefore can be easily used in scripts and cron jobs. This allows wget to be used to download files as part of triggering a specific action or retrieve files at a specific point in time. It is also worth noting that wget is designed to work with unreliable network connections and has the ability to resume downloads interrupted due to network disruptions. We can use wget to download files recursively and also set the number of times wget will try to resume an interrupted download. In this article, we show you some useful examples implementing the features of the wget command we’ve mentioned thus far. Before proceeding with the examples, let’s first verify that the command is available on the system. [root@linuxnix ~]# which wget /usr/bin/wget [root@linuxnix ~]# rpm -qf /usr/bin/wget wget-1.12-10.el6.x86_64 [root@linuxnix ~]#...
Read More