~$ wget -t0 -c -nH -np -b -m -P /localdir hostname -o wget.log
参数解释参照man,可能有些差别
-t0 :=t inf设置重试次数,0和inf表示无限次,默认是20次;
-c :递归下载,wget -c http://…/file相当于wget http://…/file*,大致是这个意思,不是说wget支持通配符;
-nH :禁止建立前缀路径;
-np :递归时,避免回到父目录;
-b :在后台运行,——运行开始会给出PID,可以使用kill命令终止;
-m :开启镜像机制(Turn on options suitable for mirroring)?,允许无限深度的递归和时间戳;
-P /localdir :设置前缀路径,也就是把文件保存到该路径下。
-o wget.log : 记录保存LOG信息到文件;