Get wget to download only new items from a list
2
0
Entering edit mode
2.4 years ago

I'm using wget to download a list of items.

Here's a sample of the long list of links in 'cram_download_list.txt':

ftp://ftp.sra.ebi.ac.uk/vol1/run/ERR323/ERR3239319/NA12750.final.cram
ftp://ftp.sra.ebi.ac.uk/vol1/run/ERR323/ERR3239324/NA12763.final.cram
ftp://ftp.sra.ebi.ac.uk/vol1/run/ERR323/ERR3239480/HG00118.final.cram
ftp://ftp.sra.ebi.ac.uk/vol1/run/ERR323/ERR3239480/HG00125.final.cram

And the wget command, which works well:

wget -i cram_download_list.txt

But the pipe breaks part way through the download. I don't want to re download the ones I've already got. Is there a way to get wget to ignore the files I've already got without having to remake the 'cram_download_list.txt' file?

wget linux • 1.0k views
ADD COMMENT
0
Entering edit mode

try using -r and --tries options for wget.

ADD REPLY
2
Entering edit mode
2.4 years ago

Actually, what I needed was

wget -c -i cram_download_list.txt

This continues partially downloaded files, rather than skipping them!

ADD COMMENT
2
Entering edit mode
2.4 years ago
Hood ▴ 40

I suppose wget -nc -i cram_download_list.txt is what you need

ADD COMMENT
0
Entering edit mode

Worked great thanks

ADD REPLY
0
Entering edit mode

In that case, accept their response as well.

ADD REPLY

Login before adding your answer.

Traffic: 2625 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6