I am downloading data from an 'ftp'
server using 'wget'
from Ubuntu system command line. I know how to download all the directories from a specific URL. Is their any command to select and download some specific directories?
I am using "wget -c -r --no-parent 'URL' --user=xx --password=xx"
Now if I give a URL xx followed by the year say 2009, then the URL will be xx/2009
. Now I want to download folders 100 to 365 within 2009, not the total folders (001 to 365)
. How can I do that?
您可以使用Shell扩展指定所需的目录:
wget -c -r --no-parent URL/2009/{100..365} --user=xx --password=xx
if someone searching for these types of problem I have another solution now which is better than wget -c -r --no-parent URL/2009/{100..365} --user=xx --password=xx
This does not have any problem, but if the URL is programmed in such a way that no one is allowed to download a large amount of data at a time then the next one will do the trick for i in $(seq -w 144 365);do wget -r --no-parent URL/year/$i --user=XX --password=xx ; sleep 30; done
for i in $(seq -w 144 365);do wget -r --no-parent URL/year/$i --user=XX --password=xx ; sleep 30; done
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.