How To Use WGET Command on Linux

Wget is one of the most frequently used commands for managing downloads in Linux systems, and has remained powerful, secure, and widely used since its inception in 1996.

Although initially designed for Linux, Wget can now be executed on Mac OS and Windows 10 systems as well. Utilizing command prompts allows for task simplicity and consistent functionality across operating systems.

In this article, we will explore the safe and reliable downloading capabilities of Wget on these three robust operating systems.

It is important to note that in Linux environments, the Wget command is automatically installed across all distros.

Download File in a Basic Way with Wget in Linux

The use of Wget at its basic level consists of the following syntax:

wget link_address

This allows us to download the files natively taking into account the network speed with which we currently have.

Download file without losing downloaded parts with Wget on Linux

To allow a download to be paused either by a network error or by some power failure we can use the -c parameter to allow if something fails as soon as we log in again the download continues. The syntax for using that possibility:

wget -c Link_Adress

Download full web page with Wget on Linux

To download a website entirely, we will use the following:

wget -m http://Adresss

Additional Parameters for Wget -m

With this command, we have downloaded all the components of the web page, but we can add parameters like:

–convert-links: This option allows you to change all the links on the page so that they point to each other.

–page-requisites: It will enable you to download the styles of the page so that your view is excellent without a connection.

–no-parent: Avoid downloading main sites linked to it.

Additional Parameters to use Wget

We can use some parameters using wget:

wget -rIt: allows us to download a web page recursively or using FTP, the syntax is:

wget -r ftp://Adress

wget -i: It offer us the possibility of downloading a list of URLs that we have in a text file, for example, we can have a file called Solvetic.txt so we will use the following:

wget -i LinuxCode.txt

man wget: This option displays a list of all the possibilities to which we have access using wget.

wget -p: This parameter gives us the chance to download a complete web page including extras such as online images, styles, etc.

wget -o: With this parameter, we can create a report about the download we have made, for example:

wget -o linuxcode.txt http://Adress

wget -t (#): By default, wget makes an attempt of 20 connections to start the download, but in case the site is very congested we can use this parameter to increase the number of attempts, for example:

wget -t 30 Adress

It is evident that Wget is a powerful and useful tool for all download-related tasks.

We have learned how to utilize the wget command on Windows, Mac, and Linux operating systems, with the latter being the most convenient due to its built-in implementation.

Although there may be slight variations in command usage across different systems, we can easily adapt and incorporate them to fit our needs.

It might be interesting

Design LLC Cloud Computing

In early 2005 representatives of firm called Design LLC went to The Dalles, Oregon where they entered into quiet negotiations with local officials and completed a transaction for a 30-acre parcel of land on the banks of the Columbia River. On that piece of land, the search giant Google built one of its massive data centers.

Virgin Media adds Sci-fi in its on Demand service

Virgin Media announced on Monday that it would add a Fantasy & Sci-fi section in its on Demand video service.

Google Voice, explained

The new Google Voice blog explains clearly all you have to know about Google voice and how you can develop new ways of communications through its additional features.

In UK, blogging is on increase

In UK, blogging is really hitting the big time. According to some statistic in a week time, one out of every 84 website visits is for a weblog.