,非互動式檔案下載工具。 G N UW g e t1 . 1 2 用法:w 選項] g e t[ . . .[ U R L ] . . . 長選項必須用的參數在使用短選項時也是必須的。 啟動: V , v e r s i o n
顯示 W g e t版本並離開
h , h e l p
印出這段說明文字
b , b a c k g r o u n d
啟動後進入背景作業
指令 e , e x e c u t e =
執行 ‘. w g e t r c ’ 形式的指令
紀錄訊息及輸入檔案: o , o u t p u t f i l e =檔案
將紀錄訊息寫入< 檔案> 中
a , a p p e n d o u t p ut =檔案
將紀錄訊息加入< 檔案> 末端
d , d e b u g
印出偵錯訊息
q , q u i e t
安靜模式 ( 不輸出訊息)
v , v e r b o s e
詳細輸出模式 ( 預設使用這個模式)
n v ,n o n v e r b o s e
關閉詳細輸出模式,但不啟用安靜模式
i , i n p u t f i l e = F I L E
d o w n l o a dU R L sf o u n di nl o c a lo re x t e r n a lF I L E .
F , f o r c e h t m l
以 H T M L方式處理輸入檔
B , b a s e = U R L
r e s o l v e sH T M Li n p u t f i l el i n k s( iF ) r e l a t i v et oU R L .
下載: 次數 t , t r i e s = O
設定重試次數 ( 0表示無限)
r e t r y c o n n r e f u s e d
即使連線被拒仍然會不斷嘗試
o u t p u t d o c u m e n t =檔案
將資料寫入指定檔案中
n c ,n o c l o b b e r
不覆寫已經存在的檔案
c , c o n t i n u e
繼續下載已下載了一部份的檔案
p r o g r e s s =方式
選擇下載進度的表示方式
N , t i m e s t a m p i n g
除非遠端檔案比較新,否則不下載遠端檔案
S , s e r v e r r e s p o n s e
顯示伺服器回應訊息
s p i d e r
秒數 T , t i m e o u t =
不下載任何資料 指定所有時限為同一數值
d n s t i m e o u t =秒數
指定 D N S查找主機的時限
c o n n e c t t i m e o u t =秒數
指定連線時限
r e a d t i m e o u t =秒數
指定讀取資料的時限
秒數 w , w a i t = w a i t r e t r y =秒數
每次下載檔案之前等待指定秒數 每次重覆嘗試前稍等一段時間 ( 由 1秒至指 定秒數不等)
r a n d o m w a i t
每次下載之前隨機地指定等待的時間
n o p r o x y
禁止使用代理伺服器
大小 Q , q u o t a =
設定下載資料的限額大小
b i n d a d d r e s s =位址
使用本機的指定位址 ( 主機名稱或 I P )進行連線
l i m i t r a t e =速率
限制下載速率
n o d n s c a c h e
不記憶 D N S查找主機的資料
r e s t r i c t f i l e n a m e s = O S
只使用作業系統能夠接受的字元作為檔案字元
i g n o r e c a s e
i g n o r ec a s ew h e nm a t c h i n gf i l e s / d i r e c t o r i e s .
4 , i n e t 4 o n l y
只會連接 I P v 4地址
6 , i n e t 6 o n l y
只會連接 I P v 6地址
p r e f e r f a m i l y = F A M I L Y
優先採用指定的位址格式,可以是 I 、I P v 6 P v 4 或者 n o n e
用戶 u s e r =
指定 f t p和 h t t p用戶名稱
p a s s w o r d = P A S S
指定 f t p和 h t t p密碼
a s k p a s s w o r d
p r o m p tf o rp a s s w o r d s .
n o i r i
t u r no f fI R Is u p p o r t .
l o c a l e n c o d i n g = E N C
u s eE N Ca st h el o c a le n c o d i n gf o rI R I s .
r e m o t e e n c o d i n g = E N C
u s eE N Ca st h ed e f a u l tr e m o t ee n c o d i n g .
目錄: n d n o d i r e c t o r ie s
不建立目錄
x , f o r c e d i r e c t o r i e s
強制建立目錄
n H ,n o h o s t d i r e c t o r i e s
不建立含有遠端主機名稱的目錄
p r o t o c o l d i r e c t o r i e s P , d i r e c t o r y p r e f i x =名稱 c u t d i r s =數目
在目錄中加上通訊協定名稱 儲存檔案前先建立指定名稱的目錄 忽略遠端目錄中指定< 數目> 的目錄層
H T T P選項: h t t p u s e r =用戶
指定 H T T P用戶名稱
h t t p p a s s w d =密碼
指定 H T T P密碼
n o c a c h e
不使用伺服器中的快取記憶資料
d e f a u l t p a g e = N A M E
C h a n g et h ed e f a u l tp a g en a m e( n o r m a l l y t h i si s` i n d e x . h t m l ' .) .
E , a d j u s t e x t e n s i o n
s a v eH T M L / C S Sd o c u m e n t sw i t hp r o p e re x t e n s i o n s .
i g n o r e l e n g t h
忽略 ‘C o n t e n L e n g t h ’ 標頭欄位 t -
h e a d e r =字串
在連線資料標頭中加入指定字串
m a x r e d i r e c t
m a x i m u mr e d i r e c t i o n sa l l o w e dp e rp a g e .
p r o x y u s e r =用戶
設定代理伺服器用戶名稱
p r o x y p a s s w o r d =密碼
設定代理伺服器密碼
r e f e r e r = U R L
在 H e f e r e r :U R L ’ 標頭 T T P請求中包括 ‘R
s a v e h e a d e r s
將 H T T P連線資料標頭存檔
U , u s e r a g e n t = A G E N T
宣稱為 A G E N T而不是 W g e t / V E R S I O N
n o h t t p k e e p a l i v e
不使用 H T T Pk e e p a l i v e(持久性連線)
n o c o o k i e s
不使用 c o o k i e
l o a d c o o k i e s =檔案
程式啟動時由指定檔案載入 c o o k i e
s a v e c o o k i e s =檔案
程式結束後將 c o o k i e 儲存至指定檔案
k e e p s e s s i o n c o o k i e s
會載入和儲存暫時性的 c o o k i e
p o s t d a t a =字串
使用 P O S T方式送出字串
p o s t f i l e =檔案
使用 P O S T方式送出檔案內容
c o n t e n t d i s p o s i t i o n
h o n o rt h eC o n t e n t D i s p o s i t i o nh e a d e rw h e n c h o o s i n gl o c a lf i l en a m e s( E X P E R I M E N T A L ) .
a u t h n o c h a l l e n g e
s e n dB a s i cH T T Pa u t h e n t i c a t i o ni n f o r m a t i o n w i t h o u tf i r s tw a i t i n gf o rt h es e r v e r ' s c h a l l e n g e .
H T T P S( S S L / T L S ) 選項: s e c u r e p r o t o c o l = P R
選擇安全通訊協定,可以使用 a u t o ,S S L v 2 , S S L v 3或 T L S v 1
n o c h e c k c e r t i f i c a t e
不檢驗伺服器的憑證
c e r t i f i c a t e =檔案
指定用戶端的憑證檔案名稱
c e r t i f i c a t e t y p e =類型
用戶端憑證的類型,可以是 P E M或 D E R
p r i v a t e k e y =檔案
指定私鑰檔案
p r i v a t e k e y t y p e =類型
私鑰的類型,可以是 P E M或 D E R
c a c e r t i f i c a t e =檔案
載有憑證管理中心 ( C A )簽章的檔案
c a d i r e c t o r y =目錄
載有憑證管理中心 ( C A )簽章的目錄
r a n d o m f i l e =檔案
作為 S S L隨機數產生程序 ( P R N G )的來源數據檔案
e g d f i l e =檔案
產生隨機數據的 E G Ds o c k e t 檔案名稱
F T P選項: f t p u s e r =用戶
指定 F T P用戶名稱
f t p p a s s w o r d =密碼
設定 F T P密碼
n o r e m o v e l i s t i n g
不刪除 ‘. l i s t i n g ’ 檔案
n o g l o b
不展開有萬用字元的 F T P檔名
n o p a s s i v e f t p
不使用「被動」傳輸模式
r e t r s y m l i n k s
在遞迴模式中,下載鏈結指示的目標檔案 不包括目錄) (
遞迴下載: r , r e c u r s i v e
遞迴下載
數字 l , l e v e l =
最大搜尋深度 ( i n f或 0表示無限)
d e l e t e a f t e r k , c o n v e r t l i n ks
刪除下載後的檔案 m a k el i n k si nd o w n l o a d e dH T M Lo rC S Sp o i n tt o l o c a lf i l e s .
K , b a c k u p c o n v e r t e d
將檔案 X轉換前先備份為 X . o r i g
m , m i r r o r
相等於 Nrli n fn o r e m o v e l i s t i n g 選項
p , p a g e r e q u i s i t e s
下載所有顯示網頁所需的檔案,例如圖片等
s t r i c t c o m m e n t s
用嚴格方式 ( S G M L ) 處理 H T M L注釋。
遞迴下載時有關接受/ 拒絕的選項: A , a c c e p t =清單
接受的檔案樣式,以逗號分隔
R , r e j e c t =清單
排除的檔案樣式,以逗號分隔
清單 D , d o m a i n s =
接受的網域,以逗號分隔
e x c l u d e d o m a i n s =清單
排除的網域,以逗號分隔
f o l l o w f t p
跟隨 H T M L文件中的 F T P鏈結
f o l l o w t a g s =清單
會跟隨的 H T M L標籤,以逗號分隔
G , i g n o r e t a g s =清單
會忽略的 H T M L標籤,以逗號分隔
H , s p a n h o s t s
遞迴模式中可進入其它主機
L , r e l a t i v e
只跟隨相對鏈結
I , i n c l u d e d i r e c t o r i e s =清單
準備下載的目錄
X , e x c l u d e d i r e c t o r i e s =清單
準備排除的目錄
n p ,n o p a r e n t
不進入上層的目錄
請將錯誤報告或建議寄給 < b u g w g e t @ g n u . o r g >。
U s a g e :w g e t[ O P T I O N ] . . .[ U R L ] . . . M a n d a t o r ya r g u m e n t st ol o n go p t i o n sa r em a n d a t o r yf o rs h o r to p t i o n st o o . S t a r t u p : V , v e r s i o n
d i s p l a yt h ev e r s i o no fW g e ta n de x i t .
h , h e l p
p r i n tt h i sh e l p .
b , b a c k g r o u n d
g ot ob a c k g r o u n da f t e rs t a r t u p .
e , e x e c u t e = C O M M A N D
e x e c u t ea` . w g e t r c ' s t y l ec o m m a n d .
L o g g i n ga n di n p u tf i l e : o , o u t p u t f i l e = F I L E
l o gm e s s a g e st oF I L E .
a , a p p e n d o u t p u t = F I L E
a p p e n dm e s s a g e st oF I L E .
d , d e b u g
p r i n tl o t so fd e b u g g i n gi n f o r m a t i o n .
q , q u i e t
q u i e t( n oo u t p u t ) .
v , v e r b o s e
b ev e r b o s e( t h i si st h ed e f a u l t ) .
n v ,n o v e r b o s e
t u r no f fv e r b o s e n e s s ,w i t h o u tb e i n gq u i e t .
i , i n p u t f i l e = F I L E
d o w n l o a dU R L sf o u n di nF I L E .
F , f o r c e h t m l
t r e a ti n p u tf i l ea sH T M L .
B , b a s e = U R L
p r e p e n d sU R Lt or e l a t i v el i n k si nFif i l e .
D o w n l o a d : t , t r i e s = N U M B ER r e t r y c o n n r e f u s e d
s e tn u m b e ro fr e t r i e st oN U M B E R( 0u n l i m i t s ) . r e t r ye v e ni fc o n n e c t i o ni sr e f u s e d .
O , o u t p u t d o c u me n t = F I L E
w r i t ed o c u m e n t st oF I L E .
n c ,n o c l o b b e r
s k i pd o w n l o a d st h a tw o u l dd o w n l o a dt o e x i s t i n gf i l e s .
c , c o n t i n u e p r o g r e s s = T Y P E
r e s u m eg e t t i n gap a r t i a l l y d ow n l o a d e df i l e . s e l e c tp r o g r e s sg a u g et y p e .
N , t i m e s t a m p i ng
d o n ' tr e r e t r i e v ef i l e su n l e s sn e w e rt h a nl o c a l .
S , s e r v e r r e s p o n s e
p r i n ts e r v e rr e s p o n s e .
s p i d e r T , t i m e o u t = S E C O N D S
d o n ' td o w n l o a da n y t h i n g . s e ta l lt i m e o u tv a l u e st oS E C O N D S .
d n s t i m e o u t = S E C S
s e tt h eD N Sl o o k u pt i m e o u tt oS E C S .
c o n n e c t t i m eo u t = S E C S
s e tt h ec o n n e c tt i m e o u tt oS E C S .
r e a d t i m e o u t = S E C S
s e tt h er e a dt i m e o u tt oS E C S .
w , w a i t = S E C O N DS
w a i tS E C O N D Sb e t w e e nr e t r i e v a l s .
w a i t r e t r y = S E C O N D S
w a i t1 . . S E C O N D Sb e t w e e nr e t r i e so far e t r i e v a l .
r a n d o m w a i t
w a i tf r o m0 . . . 2 * W A I Ts e c sb e t w e e nr e t r i e v a l s .
n o p r o x y
e x p l i c i t l yt u r no f fp r o x y .
Q , q u o t a = N U M B ER b i n d a d d r e s s= A D D R E S S
s e tr e t r i e v a lq u o t at oN U M B E R . b i n dt oA D D R E S S( h o s t n a m eo rI P )o nl o c a lh o s t .
l i m i t r a t e = R A T E
l i m i td o w n l o a dr a t et oR A T E .
n o d n s c a c h e
d i s a b l ec a c h i n gD N Sl o o k u p s .
r e s t r i c t f i le n a m e s = O S
r e s t r i c tc h a r si nf i l en a m e st oo n e sO Sa l l o w s .
i g n o r e c a s e
i g n o r ec a s ew h e nm a t c h i n gf i l e s / d i r e c t o r i e s .
4 , i n e t 4 o n l y
c o n n e c to n l yt oI P v 4a d d r e s s e s .
6 , i n e t 6 o n l y
c o n n e c to n l yt oI P v 6a d d r e s s e s .
p r e f e r f a m i ly = F A M I L Y
c o n n e c tf i r s tt oa d d r e s s e so fs p e c i f i e df a m i l y , o n eo fI P v 6 ,I P v 4 ,o rn o n e .
u s e r = U S E R
s e tb o t hf t pa n dh t t pu s e rt oU S E R .
p a s s w o r d = P A SS
s e tb o t hf t pa n dh t t pp a s s w o r dt oP A S S .
D i r e c t o r i e s : n d ,n o d i r e c t o r i e s
d o n ' tc r e a t ed i r e c t o r i e s .
x , f o r c e d i r e c t o r i e s
f o r c ec r e a t i o no fd i r e c t o r i e s .
n H ,n o h o s t d i r e c t o r i e s
d o n ' tc r e a t eh o s td i r e c t o r i e s .
p r o t o c o l d i re c t o r i e s P , d i r e c t o r y p re f i x = P R E F I X c u t d i r s = N U M B E R
u s ep r o t o c o ln a m ei nd i r e c t o r i e s . s a v ef i l e st oP R E F I X / . . . i g n o r eN U M B E Rr e m o t ed i r e c t o r yc o m p o n e n t s .
H T T Po p t i o n s : h t t p u s e r = U S E R
s e th t t pu s e rt oU S E R .
h t t p p a s s w o r d = P A S S
s e th t t pp a s s w o r dt oP A S S .
n o c a c h e
d i s a l l o ws e r v e r c a c h e dd a t a .
E , h t m l e x t e n s i o n
s a v eH T M Ld o c u m e n t sw i t h` . h t m l 'e x t e n s i o n .
i g n o r e l e n g th
i g n o r e` C o n t e n t L e n g t h 'h e a d e rf i e l d .
h e a d e r = S T R I N G
i n s e r tS T R I N Ga m o n gt h eh e a d e r s .
m a x r e d i r e c t
m a x i m u mr e d i r e c t i o n sa l l o w e dp e rp a g e .
p r o x y u s e r = U S E R
s e tU S E Ra sp r o x yu s e r n a m e .
p r o x y p a s s w o r d = P A S S
s e tP A S Sa sp r o x yp a s s w o r d .
r e f e r e r = U R L
i n c l u d e` R e f e r e r :U R L 'h e a d e ri nH T T Pr e q u e s t .
s a v e h e a d e r s
s a v et h eH T T Ph e a d e r st of i l e .
U , u s e r a g e n t = A G E N T
i d e n t i f ya sA G E N Ti n s t e a do fW g e t / V E R S I O N .
n o h t t p k e e p a l i v e
d i s a b l eH T T Pk e e p a l i v e( p e r s i s t e n tc o n n e c t i o n s ).
n o c o o k i e s
d o n ' tu s ec o o k i e s .
l o a d c o o k i e sF I L E
l o a dc o o k i e sf r o mF I L Eb e f o r es e s s i o n .
s a v e c o o k i e sF I L E
s a v ec o o k i e st oF I L Ea f t e rs e s s i o n .
k e e p s e s s i o nc o o k i e s
l o a da n ds a v es e s s i o n( n o n p e r m a n e n t )c o o k i e s .
p o s t d a t a = S T R I N G
u s et h eP O S Tm e t h o d ;s e n dS T R I N Ga st h ed a t a .
p o s t f i l e = F I L E
u s et h eP O S Tm e t h o d ;s e n dc o n t e n t so fF I L E .
c o n t e n t d i s p o s i t i o n
h o n o rt h eC o n t e n t D i s p o s i t i o nh e a d e rw h e n c h o o s i n gl o c a lf i l en a m e s( E X P E R I M E N T A L ) .
a u t h n o c h a l l e n g e
S e n dB a s i cH T T Pa u t h e n t i c a t i o ni n f o r m a t i o n
w i t h o u tf i r s tw a i t i n gf o rt h es e r v e r ' sc h a l l e n g e . H T T P S( S S L / T L S )o p t i o n s : s e c u r e p r o t o c o l = P R
c h o o s es e c u r ep r o t o c o l ,o n eo fa u t o ,S S L v 2 , S S L v 3 ,a n dT L S v 1 .
n o c h e c k c e rt i f i c a t e
d o n ' tv a l i d a t et h es e r v e r ' sc e r t i f i c a t e .
c e r t i f i c a t e = F I L E
c l i e n tc e r t i f i c a t ef i l e .
c e r t i f i c a t e -t y p e = T Y P E
c l i e n tc e r t i f i c a t et y p e ,P E Mo rD E R .
p r i v a t e k e y = F I L E
p r i v a t ek e yf i l e .
p r i v a t e k e y -t y p e = T Y P E
p r i v a t ek e yt y p e ,P E Mo rD E R .
c a c e r t i f i c a t e = F I L E
f i l ew i t ht h eb u n d l eo fC A ' s .
c a d i r e c t o r y = D I R
d i r e c t o r yw h e r eh a s hl i s to fC A ' si ss t o r e d .
r a n d o m f i l e = F I L E
f i l ew i t hr a n d o md a t af o rs e e d i n gt h eS S LP R N G .
e g d f i l e = F I LE
f i l en a m i n gt h eE G Ds o c k e tw i t hr a n d o md a t a .
F T Po p t i o n s : f t p u s e r = U S ER
s e tf t pu s e rt oU S E R .
f t p p a s s w o r d = P A S S
s e tf t pp a s s w o r dt oP A S S .
n o r e m o v e l i s t i n g
d o n ' tr e m o v e` . l i s t i n g 'f i l e s .
n o g l o b
t u r no f fF T Pf i l en a m eg l o b b i n g .
n o p a s s i v e f t p
d i s a b l et h e" p a s s i v e "t r a n s f e rm o d e .
r e t r s y m l i n ks
w h e nr e c u r s i n g ,g e tl i n k e d t of i l e s( n o td i r ) .
p r e s e r v e p e rm i s s i o n s
p r e s e r v er e m o t ef i l ep e r m i s s i o n s .
R e c u r s i v ed o w n l o a d : r , r e c u r s i v e
s p e c i f yr e c u r s i v ed o w n l o a d .
l , l e v e l = N U M B ER
m a x i m u mr e c u r s i o nd e p t h( i n fo r0f o ri n f i n i t e ) .
d e l e t e a f t e r
d e l e t ef i l e sl o c a l l ya f t e rd o w n l o a d i n gt h e m .
k , c o n v e r t l i n ks
m a k el i n k si nd o w n l o a d e dH T M Lp o i n tt ol o c a lf i l e s .
K , b a c k u p c o n v e r t e d
b e f o r ec o n v e r t i n gf i l eX ,b a c ku pa sX . o r i g .
m , m i r r o r
s h o r t c u tf o rNrli n fn o r e m o v e l i s t i n g .
p , p a g e r e q u i s i t e s
g e ta l li m a g e s ,e t c .n e e d e dt od i s p l a yH T M Lp a g e .
s t r i c t c o m m e n t s
t u r no ns t r i c t( S G M L )h a n d l i n go fH T M Lc o m m e n t s .
R e c u r s i v ea c c e p t / r e j e c t: A , a c c e p t = L I S T
c o m m a s e p a r a t e dl i s to fa c c e p t e de x t e n s i o n s .
R , r e j e c t = L I S T
c o m m a s e p a r a t e dl i s to fr e j e c t e de x t e n s i o n s .
D , d o m a i n s = L I ST
c o m m a s e p a r a t e dl i s to fa c c e p t e dd o m a i n s .
e x c l u d e d o m ai n s = L I S T
c o m m a s e p a r a t e dl i s to fr e j e c t e dd o m a i n s .
f o l l o w f t p
f o l l o wF T Pl i n k sf r o mH T M Ld o c u m e n t s .
f o l l o w t a g s = L I S T
c o m m a s e p a r a t e dl i s to ff o l l o w e dH T M Lt a g s .
i g n o r e t a g s = L I S T
c o m m a s e p a r a t e dl i s to fi g n o r e dH T M Lt a g s .
H , s p a n h o s t s
g ot of o r e i g nh o s t sw h e nr e c u r s i v e .
L , r e l a t i v e
f o l l o wr e l a t i v el i n k so n l y .
I , i n c l u d e d i r ec t o r i e s = L I S T
l i s to fa l l o w e dd i r e c t o r i e s .
X , e x c l u d e d i r ec t o r i e s = L I S T
l i s to fe x c l u d e dd i r e c t o r i e s .
n p ,n o p a r e n t
d o n ' ta s c e n dt ot h ep a r e n td i r e c t o r y .
符碼記憶 @h t t p : / / w e r d n a 1 2 2 2 c o l d c o d e s . b l o g s p o t . c o m / 整理