wget CentOS: Command Guide & Examples

In CentOS, you can use the wget command by following these steps:

  1. Basic usage: Download files using the wget command. Syntax:
  2. wget [options] [URL]
  3. For example:
  4. Download file.txt from http://example.com using wget.
  5. Specify the file name for saving: you can use the -O option to specify the name of the file to be saved. The syntax is:
  6. Download the file from the specified URL and save it with the given filename using wget.
  7. For example:
  8. Download the file.txt from http://example.com and save it as myfile.txt using wget.
  9. Resume downloading: You can enable the resume downloading feature using the -c option. If the download is unexpectedly interrupted, you can continue downloading by using this option. The syntax is:
  10. Download the file from the specified URL with the option to continue interrupted downloads.
  11. For example:
  12. Download the file.txt from the website http://example.com with the option to resume the download if interrupted.
  13. Background download: You can use the -b option to run the download task in the background. Syntax is:
  14. Initiate the download process in the background using the given URL.
  15. For example:
  16. Download the file.txt from http://example.com in the background.
  17. Limit download speed: You can use the –limit-rate option to restrict the download speed, measured in bytes per second. The syntax is as follows:
  18. Download the file from the provided URL at a specified speed limit.
  19. “For example,”
  20. Download the file.txt from http://example.com with a speed limit of 100k.

These are just some common uses of the wget command; you can refer to the complete help document by using the man wget command to learn more options and uses.

bannerAds