Downloads a file from the specified URL.

WGET(1) GNU Wget

       Wget The noninteractive network downloader.


  • The jupyter notebook format file on github is here .

google colaboratory

  • To run it in google colaboratory here /wget_nb.ipynb)


The author’s OS is macOS, and the options are different from those of Linux and Unix commands.

When you actually run the command, the leading ! and %%bash in the first line.

ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G2022
!bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
Copyright (C) 2007 Free Software Foundation, Inc.

Example usage

Normally, you can use the -O option to save files locally.

wget https://ja.wayama.io/index.html -O test.html
--2020-07-03 20:23:00-- https://ja.wayama.io/index.html
Querying DNS for ja.wayama.io (ja.wayama.io)...,,, ...
Connecting to ja.wayama.io (ja.wayama.io)||:443... Connection made.
Sending connection request via HTTP, waiting for response... 200 OK
Length: 9402 (9.2K) [text/html].
Saving to `test.html'.

     0K .........                                             100% 54.0M=0s

2020-07-03 20:23:00 (54.0 MB/s) - Saving to `test.html' completed [9402/9402].

Check to see if the file exists. It has been downloaded properly.

ls | grep test
The file is downloaded correctly.

Typical options

There are many options, but for now I just remember -O.

  • O : Specify the file name.