wget CentOS: Command Guide & Examples
In CentOS, you can use the wget command by following these steps:
- Basic usage: Download files using the wget command. Syntax:
- wget [options] [URL]
- For example:
- Download file.txt from http://example.com using wget.
- 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:
- Download the file from the specified URL and save it with the given filename using wget.
- For example:
- Download the file.txt from http://example.com and save it as myfile.txt using wget.
- 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:
- Download the file from the specified URL with the option to continue interrupted downloads.
- For example:
- Download the file.txt from the website http://example.com with the option to resume the download if interrupted.
- Background download: You can use the -b option to run the download task in the background. Syntax is:
- Initiate the download process in the background using the given URL.
- For example:
- Download the file.txt from http://example.com in the background.
- 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:
- Download the file from the provided URL at a specified speed limit.
- “For example,”
- 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.