Shell Tutorial: Downloading data using Wget

Learn wget, the command-line tool for downloading files and entire websites. The tutorial covers installation on Linux, macOS, and Windows, basic syntax, and key flags like background execution and resume capability. wget handles single files, directories, or full web pages.
Chapters
Welcome back. In this lesson we will introduce another command line tool for downloading data called wget. We will walk through how to install and set up wget along with some basic usage. WGET derives its name from World Wide Web and gatt. It is a GNU project native to the Linux system, but is compatible across all operating systems. It is another command line tool that will help you download files via HTTP and FTP. Compared to Curl, WGET is more multi purpose. It can download a single file, an entire folder, or even a web page. Most importantly, it makes multiple file downloads possible. Recurs Aside from using man, another way to check if WGET has been installed correctly is by using which wget. This will return the location of where WGET is installed, for example in the local user bin. If uwget has not been installed, there will simply be no output. The official documentation and source code for WGET is listed, but unless you are comfortable compiling from the source code, here are some easier alternatives. For Linux users, it is likely WGET is already installed for you. If not, run sudo apt get Install WGET on the command line for Mac users, use homebrew by running brew Install WGET on the command line for Windows users. This will not be a command line install. Rather visit the link listed on the slide to download as part of the GNU Win32 package. Once installation is complete, use the man command to print the WGET manual. Remember to press Enter to scroll and to press Q to exit. The basic syntax for WGET has a similar structure to curl wget Option flags URL the URL is also required for the WGET command to run successfully. WGET supports a large number of protocol calls for data stored on servers. For a full list of the options available, refer to WGET Help. Here are some option flags unique to wget. B allows your download to run in the background. Q turns off the WGET output, which saves some disk space. C is useful to finish up a previously broken download, whether by WGET or another program. Finally, you can link all the option flags together, like wget bqc followed by the file location. Running this command on this hypothetical file location will generate the output. Continuing in background PID 12345 the PID is a unique process ID assigned to this particular data download job for your reference in case you need to cancel the process. In this lesson, we learned another way to download files.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







