Home » Uncategorized » How to use wget to download files

How to use wget to download files

If you preserve a Linux server that does not consist of a GUI, you may discover yourself at a loss for downloading files. You could utilize FTP, however that would depend upon the files you require being stored on an ftp server, and FTP is not nearly as prevalent as it when was. What do you do? You utilize wget.

linux consultant might help you too.

More about Open Source

Raspberry Pi No W: The wise individual’s guide
What’s brand-new in LibreOffice 5.3
Why Munich made the switch from Windows to Linux– and might be reversing course
Sign up for our Open Source Weekly newsletter
The wget tool has actually been around since 1996, and you’ll be grateful you have it when it’s required. It’s a really straight-forward tool to use, and it features extra alternatives that can be available in convenient. I’ll stroll you through the fundamental usage of wget and the best ways to use some of those alternatives, so you don’t have to leap through hoops to obtain those files onto your GUI-less servers.

You do not need to worry about installing wget, since it is on a lot of Linux circulations (desktop and server) by default. Let’s get to work.

SEE: Power checklist: Managing and fixing Linux user accounts (Tech Pro Research).

How to use wget.
Standard usage.

The most basic usage of wget is (URL is the specific address of the file you wish to download):.

wget URL.
That command will download the necessary file into the existing working directory.

Renaming files.

If you wish to download the file under a different name, you can do that utilizing the -O option thus (NEW_NAME is the name you want to save the file under, and URL is the precise address of the download):.

wget -O NEW_NAME URL.
This can be beneficial when you need to download the very same file, multiple times, under various names.

Bandwidth throttling.

When you run the wget command it can gobble up a significant quantity of bandwidth throughout the download procedure. If you’re on a server that needs as much bandwidth as possible to operate properly, you may have to limit the speed of wget downloads. This can be maded with the– limit-rate alternative thus:.

wget– limit-rate= RATE URL.
Where RATE is a value in either kilobytes (k) or megabytes (m). State you want to restrict the download to 2MB/sec; that command would look like (URL is the real address of the download):.

wget– limit-rate= 2m URL.
Resuming a disrupted file.

Say you’re downloading a file and, for whatever factor, the download is disrupted. You can inform wget to get that download where it left off by providing the following command (URL is the exact same URL you used when first attempting to download the file):.

wget -c URL.
Downloading numerous files simultaneously.

You can utilize wget to download several files in one session. To do this you should produce a text file with the precise file URLs for downloading, one per line, like so:.

Leave a Reply

Your email address will not be published. Required fields are marked *