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

MediaTek was the first to show Wi-Fi 7 technology in operation

Wi-Fi 7-enabled devices are expected to hit the market in 2023

Lycos To Relaunch Search Services In Europe, For Whatever Reason

Have you heard of Lycos? Well they are not dead yet and they seem to be rising again like a phoenix. the search engine and web portal has announced that it got back its license to use the trademarked brand names “Lycos”and “Hotbot” within the Europe.

Google earth app for Android out in the market!

There appears to be excellent news for Android users because the Google Earth app is finally here for use. In fact the image quality is as amazing which is used for the PC version.

A new merger of Sony Corporation of America and Gracenote Inc

NEW YORK, April 22 /PRNewswire/–Sony Corporation of America (SCA) has announced in a press release today that Sony is going to acquire Gracenote, Inc. According to the merger agreement Sony is paying almost $260 million with other contingent concern.