Run wget in the background to download large files

wget is a powerful command to copy files from one server to another. However when downloading large files the following commands will help you continue your work or allow you to shutdown the command window and return at a later stage.

Example

$ wget -bqc http://yourdomain.com/mybigfile.tar

Explanation of the syntax

  • -b: Go to background immediately. If no output file is specified via -o, output is redirected to wget-log.
  • -q: Turn off wget output (saves 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.

An alternative method is to use nohup.

$ nohup wget http://yourdomain.com/mybigfile.tar &
# exit from shell
exit

To get the status of nohup, use the following command.

$ cat nohup.out