C
C
callback2013-12-16 17:48:43
linux
callback, 2013-12-16 17:48:43

How to execute command after wget recursive download finished?

It is required to execute some command (for example, mv) after the recursive download of the site is completed using the wget program (switch -r).
I tried to write a script where the first line is wget -r, and the second is my command. The command is executed without waiting for the site to finish loading.
Tried to write a script: wget -b -r ... ; wait; <my team>. Again the same thing.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Ruslan Lopatin, 2013-12-16
@callback

Remove the wget -b option.

B
buggykey, 2013-12-17
@buggykey

If I understand correctly, the -b key means "background", that is, the background mode. If this option is removed, then the next command in the script will be executed only after the completion of wget, which is what we wanted.

O
oia, 2013-12-16
@oia

And if so wget -b -r ... && <my command>

E
energetix_user, 2013-12-16
@energetix_user

wget -b -r ... ; wait; <my team>

wait here it was necessary to specify the time in seconds, how much is approximately required to complete the download.
For example:
wget -b -r ... ; wait 60 ; <my team>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question