How can I download a file unattended using wget
(for example, I want to download a large ISO file in the background)?
In order to download a file using Wget, type wget followed by the URL of the file that you wish to download. Wget will download the file in the given URL and save it in the current directory.
You can actually initiate a download and disconnect from the system, letting wget complete the job. Wget's -P or --directory-prefix option is used to set the directory prefix where all retrieved files and subdirectories will be saved to.
In many shells, CTRL+C will cancel the currently-running process. If you are running a Linux shell, pkill -9 wget should be able to force-kill it if it's running in the background.
wget -bqc http://path.com/url.iso
where:
-b : Go to background immediately after startup. If no output file is specified via the -o, output is redirected to wget-log.
-q : Turn off Wget's output (saves some disk space)
-c : Resume broken download i.e. continue getting a partially-downloaded file. This is useful when you want to finish up a download started by a previous instance of Wget, or by another program.
Alternative method:
Use nohup
like this:
nohup wget http://domain.com/dvd.iso & exit
Thanks to: nixCraft
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With