wget [option]... [URL]...
命令參數啟動選項
-V, --version 打印版本信息
-h, --help 打印幫助信息
日志和輸入文件選項
-o logfile, --output-file=logfile 將日志消息寫入 logfile
-a logfile, --append-output=logfile 將日志消息追加到 logfile
-d, --debug 打開調試輸出,打印調試信息
-q, --quiet 打開安靜輸出,不打印任何信息
-v, --verbose 打開詳情輸出,這是默認的輸出
-nv, --no-verbose 關閉詳情輸出,但不等于是安靜輸出
-i file, --input-file=file 從 file 讀取 URL
下載選項
-t number, --tries=number 設置重試次數,number 為 0 表示無限重試
-O file, --output-document=file 將文檔寫到file文件
-c, --continue 端點續傳
-S, --server-response 打印服務器的響應消息
--spider 只檢查資源是否存在而不下載資源
-T seconds, --timeout=seconds 設置網絡超時
--dns-timeout=seconds 設置 DNS 超時
--connect-timeout=seconds 設置連接超時
--read-timeout=seconds 設置讀寫超時
--limit-rate=amount 限制下載速度
-Q, --quota=NUMBER 設置下載的容量限制
實例a) 下載單個文件
wget http://jsoup.org/packages/jsoup-1.8.1.jar
b) 下載文件并指定文件名
wget -O example.html http://www.example.com/
c) 下載文件中指定的 URL
wget -i imglist.txt
d) 限制下載速度
wget --limit-rate 3K http://jsoup.org/packages/jsoup-1.8.1.jar
e) 斷點下載
wget -c http://jsoup.org/packages/jsoup-1.8.1.jar
f) 判斷資源是否存在
wget --spider http://jsoup.org/packages/jsoup-1.8.1.jar
g) 指定文件保存目錄
wget -P /home/huey/downloads http://jsoup.org/packages/jsoup-1.8.1.jar
新聞熱點
疑難解答