BBS水木清华站∶精华区

发信人: larkwang (云中雀), 信区: Linux 
标  题: LarkWang的wget script. :) 
发信站: BBS 水木清华站 (Tue Apr 21 10:56:40 1998) 
 
【 在 raner (毕设好无聊呀!) 的大作中提到: 】 
    知道呀, 那是我刚down的, 在win95下用right mouse Copy Link Location 
    然后切换到netterm wget的, 一个个来, 好麻烦(是从sunsite Incoming下 
    的, src.rpm 那里只有几个不全)  
    这wget写得也不好, 连个filename match都没有, 只有后缀(注意, 我是要过 
    http-syle proxy的, 不然direct ftp好象可以). 昨天为了download不以ja- 
    ko-打头的东西竟然还要去直接改wget source, 真够呛, 不过source写得真 
    够清晰... 后来发现有个-nc参数不错, 比-N(timestamp好), -N要比较时间和 
    文件大小, 而一用proxy往往无法-N, 但-nc还是可以的(它只看loal有没有文件,  
    有就不download了), 这样可以直接删掉index.html中不想要的文件, 不用改 
    source... 
    haha, 有源码就是好, 连应用程序都可以自己定制 :-))) 
 
可以用 -i filename , filename 是 url 的列表 
 
看我写的几个 script  
 
#!/bin/sh 
# name: cgetd 
# goal: run wget to retrieve things with directory hierachy  
echo "exec wget -x -T 40 -t 0 -c -m -i wgetlist -a d.log&" > ./getd 
chmod +x ./getd 
 
 
#!/bin/sh 
# name: cgetnd 
# goal: run wget to retrieve things without directory hierachy  
echo "exec wget -T 40 -t 0 -nd -c -m -i wgetlist -a d.log&" > ./getd 
chmod +x ./getd 
 
 
#!/bin/sh 
# name: cpgetnd 
# goal: run wget to retrieve things without directory hierachy via proxy 
echo "exec wget -Y on --no-parent -T 40 -t 0 -nd -c -m -i wgetlist -a d.log&" >  
chmod +x ./getd 
 
#~/.wgetrc 
use_proxy=off 
http_proxy=xx.xx.xx.xx:8080 
ftp_proxy=xx.xx.xx.xx:8080 
 
然后选一个运行一下 , 生成 getd , 写一个 wgetlist , 然后 ./getd . 非常方便 
 
-- 
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: ns.cstnet-hf.ne] 

BBS水木清华站∶精华区