1
#!/bin/bash 2 for i in {1901..2014} 3 do 4 cd /home/xxxx/hapood/ncdc 5 wget --execute robots=off -r -np -nH --cut-dirs=4 -R index.html* ftp://ftp.ncdc.noaa.gov/pub/data/gsod/$i/ 6 done

创建 

$vi getbigdata.sh

导入上述代码。

$ ./getbigdata.sh 运行脚本

CentOs中,之前没有使用过Wget,会出现 无法识别wget的错误提示。

 

使用yum命令

sudo yum install wget

自动安装完成之后 再次运行脚本。

 

posted on 2018-05-03 15:29  Mereder  阅读(158)  评论(0编辑  收藏  举报