wget

What is wget?

wget is a command-line application that is mainly used to download files from another servers. This can be done through HTTP/HTTPS or FTP

How to use wget

# syntax : OPTIONS = optional
wget <OPTIONS> <FILE>

##### Download a single file
wget domain.com/file.txt
##### Download a single file, save it under another name
wget -O myFile.txt domain.com/file.txt
##### Download a JS file
wget https://code.jquery.com/jquery-3.3.1.min.js

##### Download a single file via FTP
wget --ftp-user=FTP_USERNAME --ftp-password='FTP_PASSWORD' ftp://URL/PATH_TO_FILE/FILE_NAME
##### Downloading all files in a directory 
wget --ftp-user=FTP_USERNAME --ftp-password='FTP_PASSWORD' ftp://URL/PATH_TO_FTP_DIRECTORY/*
##### Download a file in the background
wget -bq domain.com/file.txt
##### Download the full HTML file of a website
wget -m http://domain.com
##### Download multiple files from a file :
cat urls.txt
url1.com/file
url2.com/file
url3.com/file

wget -i urls.txt

Last updated