Learn to download files at the Linux command line.
Linux wget command summary with examples (3:40)
Videos can also be accessed from the YouTube Playlist.
Our eighty-fifth word, or command to memorize is
wget from our category
wget allows you to download files
Recall from the last video (tutorial) on
ftp we manually logged in to a remote
site, and now we'll download files non-interactively.
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
wget command has
over 130 options, and yes, I counted. (Please review
man wget.) The argument is
the URL, or Uniform Resource Locator, which is that long field at the
top of your browser pointing to a file using a variety of Protocols,
normally http, but could also be
https, ftp and others.
Like most commands, help is available with double-dash
-b option will kick time-intensive
operations into the background, and
-a will append messages to a specified
So why is
wget an important command?
Well, organizations, like search engines, need an automated way to
scrape and process information from the Internet.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go. So wget can get very complex, but let's
try it for something simple, and something I've been curious about.
less to see if that
simple-looking Google homepage is simple.
(The output below is a subset of the html file downloaded from the google.com home page.)
Okay, well looking at it, it doesn't seem as complex as you might
think (sarcasm intended), although the formatting is kind of strange
here (no sarcasm intended here).
And next, there's another public file I know something about, it's a
data set I use for teaching an investment modeling boot camp on
YouTube, the file is at
And then last, let's review it using
It has returns on four stocks, an Index and Treasury bills for 5-years and we use that to geek out on Statistics in Finance (Quant 101). Check that out if you are interested.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
wget can also take a long
list of files as input, it can follow links recursively and it'll
even eat cookies.
Okay, thanks for visiting today. I hope this was a helpful
introduction to the
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
Our YouTube Channel is growing, subscribe here to be a part of it.
ftpcommand, hit Back.
sshcommand, click Next.