David Z David Z - 3 years ago 142
Linux Question

wget for selected samples from ftp?

I wanted to download selected files from this site:

ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByStudy/sra/SRP/SRP042/SRP042286


If I wanted to download all of them I could do:

$wget -r ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByStudy/sra/SRP/SRP042/SRP042286/*


But my questions what a simple way to download just selected samples such as
SRR1299458/ - SRR1299466/
.

Answer Source

You can use wget -r ftp://example.com/path/{dir1,dir2}:

wget -r ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByStudy/sra/SRP/SRP042/SRP042286/{SRR1299458,SRR1299466}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download