wget
wget linux command cheatsheet by Thamizhiniyan C S
Introduction
GNU Wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.
Syntax
wget [option]... [URL]...
Important Flags
Flags | Description |
---|---|
| To background the downloading process |
| To continue to the partially downloaded file (It will look for the partially downloaded file in the directory and starts appending; takes no argument) |
| To specify retries to the URL |
| To specify the output name of downloaded file |
| To overwrite the logs into another file |
| To append the logs into already existing file without deleting previous |
| Read the list of URLs from a file. |
| To give a login username(Use --ftp-user and --http-user if doesn't work) |
| To give a login password( Use --ftp-password and --http-password if doesn't work) |
| Ask for a password prompt if a login is necessary. (I recommend using this flag instead of --password because there are chances that password might start with $ or something else that can be interpreted as something else in your terminal) |
| Similarly to curl(supports k and m notation for kB and mB respectively) |
| This is to specify the waiting time before the retrieval from a URL.(Takes time in seconds) |
| Timeout the retrieval after a specified amount of time.(Takes time in seconds) |
| Enables timestamping |
| To specify the user-agent while downloading the file |
Examples
Command | Description |
---|---|
Downloading a file with different file name | |
Specifying logfile as log.txt with timestamping enabled | |
Read URLs from "file.txt" and limit the download speed to 1mbps |
Last updated