R
R
Ruslan Makarov2015-07-03 19:30:24
linux
Ruslan Makarov, 2015-07-03 19:30:24

How to complete the wget file command in debian?

Good afternoon!
I am uploading files to a server (vps on debian 7) by command with a list of required files

wget http://site.ru/file1.zip 
wget http://site.ru/file2.zip 
wget http://site.ru/file3.zip

before that, going to the desired directory with the command:
cd /papka-s-failami/
But for some reason, the terminal mistakenly read the addresses of files with a long name and gave a 404 error for many files, while loading the rest.
Now, in order not to select the missing files manually (there are more than 500 of them) and not to load everything else (more than 50GB), you need the following:
If there is already such a file in the directory (by name and size), then skip it and proceed to loading the next one...

Is it possible to upgrade the wget command like this?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan Makarov, 2015-07-03
@facepook

Another way to solve this problem:

wget -nc --no-clobber -i http://site.ru/file.html - где в html файле список ссылок на файлы
wget -nc --no-clobber -i http://site.ru/file.txt - список прямых ссылок на файлы

Thanks Avtandil Tridvarasov for -nc --no-clobber, which means: skip if a file with the same name already exists
and -i - says that you need to download files that are listed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question