Data Processing in Shell
Susan Sun
Data Person
Wget
:
Check if Wget
is installed correctly:
which wget
If Wget
has been installed, this will print the location of where Wget
has been installed:
/usr/local/bin/wget
If Wget
has not been installed, there will be no output.
Wget source code: https://www.gnu.org/software/wget/
Linux: run sudo apt-get install wget
MacOS: use homebrew and run brew install wget
Windows: download via gnuwin32
Once installation is complete, use the man
command to print the Wget
manual:
Basic Wget
syntax:
wget [option flags] [URL]
URL is required.
Wget
also supports HTTP
, HTTPS
, FTP
, and SFTP
.
For a full list of the option flags available, see:
wget --help
Option flags unique to Wget
:
-b
: Go to background immediately after startup
-q
: Turn off the Wget
output
-c
: Resume broken download (i.e. continue getting a partially-downloaded file)
wget -bqc https://websitename.com/datafilename.txt
Continuing in background, pid 12345.
Data Processing in Shell