wget用法まとめ
3412 ワード
wget Linux , Hrvoje Niksic, Windows 。 :
(1) ; , FlashGet , ,Wget , ;
(2) FTP HTTP ; HTTP , , , FTP ;
(3) ; , , , ;
(4) ; , , , , , , ;
(5) , ; , ; , , , ;
wget , , :wget [ ] URL。 wget 。
1、 http ftp 。
wget http://place.your.url/here
http://place.your.url/here 。 -x , -nd , 。
wget -r http://place.your.url/here
, , 。 , , , , , ! , 。 -l number 。 , -l 2。
, -m , :wget -m http://place.your.url/here
wget 。 ,wget , robots.txt robots.txt 。
2、 。
, , , 。wget , -c , :
wget -c http://the.url.of/incomplete/file
。-t , 100 , -t 100, -t 0, , 。-T , -T 120, 120 。
3、 。
, , URL , download.txt, :wget -i download.txt
download.txt URL 。( , , )
4、 。
wget , 。 :
wget -m –reject=gif http://target.web.site/subdirectory
http://target.web.site/subdirectory, gif 。–accept=LIST ,–reject=LIST 。
5、 。
wget / , :
–http-user=USER HTTP
–http-passwd=PASS HTTP
, , curl。
6、 。
, wget 。 .wgetrc 。 :
http-proxy = 111.111.111.111:8080
ftp-proxy = 111.111.111.111:8080
http ftp 。 :
–proxy-user=USER
–proxy-passwd=PASS
。
–proxy=on/off 。
wget , 。
:
:
wget [ ] [ 、 ]
-V,–version ;
-h,–help ;
-e,–execute=COMMAND “.wgetrc”
-o,–output-file=FILE ;
-a,–append-output=FILE ;
-d,–debug ;
-q,–quiet ;
-i,–input-file=FILE URL;
-t,–tries=NUMBER (0 )
-O –output-document=FILE
-nc, –no-clobber
-N,–timestamping
-T,–timeout=SECONDS
-Y,–proxy=on/off
-nd,–no-directories
-x,–force-directories
–http-user=USER HTTP
–http-passwd=PASS HTTP
–proxy-user=USER
–proxy-passwd=PASS
-r,–recursive 、 ( )
-l,–level=NUMBER
-A,–accept=LIST
-R,–reject=LIST
-D,–domains=LIST
–exclude-domains=LIST
-L,–relative
–follow-ftp FTP
-H,–span-hosts
-I,–include-directories=LIST
-X,–exclude-directories=LIST
, –cut-dirs ,
wget -r -np -nH –cut-dirs=3 ftp://host/test/
.txt
wget -r -np -nH -nd ftp://host/test/
%B4%FA%B8%D5.txt
wget “ftp://host/test/*”
%B4%FA%B8%D5.txt
, , wget encode_string , patch encode_string “%3A” , decode_string “:”, ,decode_string wget 。
wget -t0 -c -nH -x -np -b -m -P /home/sunny/NOD32view/ http://downloads1.kaspersky-labs.com/bases/ -o wget.log