Networking

Make ‘wget’ Resume From An Interrupted Download

Today’s just going to be a quick article, an article where we learn how to make ‘wget’ resume from an interrupted download. This is a darned useful function you can add to a wget command, especially if you’re in an area with sketchy connectivity. To learn to make wget resume from an interrupted download, read on!

So many of my articles are written because of something I did recently. Many are still based on my copious notes (we’re well over 300 articles here on Linux Tips), but those will run out eventually. I’m often thinking of new ideas for articles and sometimes my day-to-day computing gives me an article idea that’s not from my notes. This is one of those…

Today, we’re going to cover yet another wget feature! We’ve had many wget articles. Here are a few of them:

Limit The Download Speed For ‘wget’
Rename A File Downloaded With ‘wget’
How To: Hide The Output From wget

And we’ve used wget in many articles. Go search for “wget”.

By now, many of my regular readers will be more than familiar with wget. So, what is wget? It’s a terminal-based tool that you use to download files. I use it often. You’re encouraged to check man wget for more information.

I use it outside of the browser, even if I found the download link via a browser. It’s just that handy and the throughput rate seems to be greater with wget (oftentimes). If you check the man page, wget describes itself as:

The non-interactive network downloader.

Which is exactly what it does. Which is nice…

How To: Make ‘wget’ Resume From An Interrupted Download:

You’ll kinda sorta maybe need an open terminal for this article. If you don’t know how to open the terminal, you can do so with your keyboard. Press CTRL + ALT + T and your default terminal should pop open.

With your terminal open, you just need a file to download… I’ll let you pick that. You also need to interrupt your download, so that you can practice this…

Wait, no… That’s just silly. Instead of practicing this, just learn from my usage and call it good. There’s no need to replicate this until you need it. Yeah, that’s the ticket!

So, imagine my surprise when I learned that Gentoo now has a live USB edition. (I was pretty surprised.) I immediately decided to download the file, though I’ve still not tried it. To download the .iso, I used the fantastic wget tool.

My terminal was already open. My present working directory was already the ‘Downloads’ directory. I had nothing to do except enter the wget command. The command I entered was this:

wget https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/20230226T163212Z/livegui-amd64-20230226T163212Z.iso

As you may know, my DSL provider made me angry and I’m now using a combination of a mobile hot spot and satellite. My mobile provider likes to disconnect me for 30 minutes at a time and does so at varied intervals.

I normally just switch to the satellite connection for 30 minutes but wget didn’t like that. I’d already downloaded half of the file while tethered to my phone and didn’t want to download it again. Downloading data I’d previously downloaded is just a pain in the butt and slows things down. So, I added the -c flag. The command I then used, once connectivity was restored, was this:

wget -c https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/20230226T163212Z/livegui-amd64-20230226T163212Z.iso

Sure enough, wget resumed from where it left off when the connection dropped out. I didn’t have to download that all over again. Sure, wget will automatically retry a few times (which you can modify) but it’s not going to keep trying for 30 minutes (by default) or longer. So, this is how you make wget resume from an interrupted download.

Closure:

See, it’s easy to make wget resume from an interrupted download. Was it worth writing an entire article for a single flag? I’d say yes. Well, of course, I would say yes. If I didn’t think it was worth an entire article, I wouldn’t have written an entire article about it!

Ah well…

And now you know…

You’re welcome…

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Recent Posts

Enable/Disable Your Network Interface

Today we'll cover one way to enable or disable your network interface in the Linux…

7 months ago

Check Your NIC Speed In The Terminal

Today's exercise is a nice and simple exercise where we check your NIC speed in…

7 months ago

Easily Monitor Your Wireless Connection

Have you ever wanted to easily monitor your wireless connection? Well, now you can learn…

7 months ago

Count The Files In A Directory

I think I've covered this before with the ls command but this time we'll count…

7 months ago

Get System Information With The ‘uname’ Command In Linux

Today we'll be learning about a basic Linux command that's known as 'uname' and it…

7 months ago

hardinfo Has Been Rebooted As hardinfo2

If you've used hardinfo in the past, it may interest you to know that hardinfo…

7 months ago