How to run wget In background for an unattended download of files?
Asked Answered
H

2

25

How can I download a file unattended using wget (for example, I want to download a large ISO file in the background)?

Heresy answered 26/1, 2014 at 15:26 Comment(0)
H
53
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://example.com/dvd.iso &
exit

nixCraft

Heresy answered 26/1, 2014 at 15:26 Comment(2)
nohup wget domain.com/dvd.iso > /dev/null 2>&1 & similar question here #4797550Wikiup
To see if the process is indeed running after exiting from shell and logging again, type top or htop command. jobs -l does not list the process once exited from the shell and logging again.Depot
M
0

I would go with

wget http://path.com/url.iso &> wget.log &
Mithras answered 27/6, 2023 at 0:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.