Run wget In Background For an Unattended Download of Files

by on August 27, 2007 · 7 comments· LAST UPDATED March 7, 2011

in , ,

Here is a quick tip, if you wish to perform an unattended download of large files such as Linux DVD ISO file use the wget command as follows:

wget -bqc

=> -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 aka save 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.

This tip will save your time while downloading large ISO file from the Internets.

nohup command

You can also use the nohup command to execute commands after you exit from a shell prompt:
$ nohup wget &
$ exit

screen command

You can also use the screen command which is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells).

See also

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 7 comments… read them below or add one }

1 downforce September 14, 2007 at 12:21 am

Nice tip thanks.

Personally though screen is still more useful.


2 skip September 14, 2007 at 5:34 am

How to download a file, In ‘save target as’ mode. Sometimes files are hidden under some urls. How to download such files.


3 Dave February 2, 2010 at 9:36 am

nice tip! if you give the -q option does -b not output to a log file?


4 mccbala April 15, 2011 at 11:26 am

Wow! I’ve really needed this… Thanks a ton!


5 majed July 19, 2011 at 1:25 pm

Thanks, the b option is great, I can use this option to download large files, initiating the download from an SSH terminal, and the download will continue after I close the SSH terminal.


6 amplatfus September 12, 2012 at 7:51 am

Can option b used in dd-wrt router? I want the download to continue after closing the terminal in Ubuntu. I want the download to continue in router with dd-wrt firmware and HDD attashed.
Thank you for post and all comments!


7 person August 4, 2014 at 3:19 pm

perfect for using in win-scp or other tools that can issue single ssh commands but cant handle interactive output.


Leave a Comment

Tagged as: , , , , , , , , , , ,

Previous post:

Next post: