Run wget In Background For an Unattended Download of Files

by Vivek Gite on August 27, 2007 · 5 comments

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 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 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 http://domain.com/dvd.iso &
$ 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

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

We're here to help you make the most of sysadmin work. So, subscribe!

{ 5 comments… read them below or add one }

1 downforce September 14, 2007

Nice tip thanks.

Personally though screen is still more useful.

Reply

2 skip September 14, 2007

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

Reply

3 Dave February 2, 2010

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

Reply

4 mccbala April 15, 2011

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

Reply

5 majed July 19, 2011

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.

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 4 + 15 ?
Please leave these two fields as-is:
Are you a human being? Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: