Hosting or Servers Logo

Fetch a File Using the Linux wget Command

Linux wget Command

The wget command is a Linux command line utility for downloading files from the internet. The basic syntax for wget is as follows:

wget [option]... [URL]...

For example, to download the file "bob.txt" from the website "example.com" you would use the following command:

wget http://example.com/bob.txt

To change the name of the file you are downloading you would use the following:

wget -O jack.txt http://example.com/bob.txt

The Linux wget command has many different uses such as:

  • Download a single file: You can use the command “wget <url>” to download a single file from an HTTP or FTP server.
  • Download multiple files: You can use the command “wget -i <filename>” to download multiple files at once. The filename should contain a list of URLs to download.
  • Mirror a website: You can use the command “wget -m <url>” to download an entire website with all its associated files and folders.
  • Download with a certain speed limit: You can use the command “wget ----limit-rate=<rate> <url>” to specify a maximum download rate.
  • Download files from a password-protected site: You can use the command “wget ------user=<username> --password=<password> <url>” to download files from a password-protected website.
  • Download files over an FTP connection: You can use the command “wget ------ftp-user=<username> ------ftp-password=<password> <url>” to download files from an FTP server.

For the comprehensive details on how to fully use the wget command head over to the wget manual page.

You Are Leaving Us

This link is being provided as a convenience and for informational purposes only it is not an endorsement or an approval of any of the products, services or opinions of the corporation or organization or individual.

Hostingorservers.com bears no responsibility for the accuracy, legality or content of the external site or for that of subsequent links.

You Are Leaving Us

This link is being provided as a convenience and for informational purposes only it is not an endorsement or an approval of any of the products, services or opinions of the corporation or organization or individual.

Hostingorservers.com bears no responsibility for the accuracy, legality or content of the external site or for that of subsequent links.