wget常用參數如下
GNY Wget ,一個非交談式的網路抓檔工具.
用法: wget [選項]... [URL]...
命令的引數使用長項目與短項目相同.
使用遞回方式的取回:
-r, --recursive像是吸入web的取回--請小心使用!.
-l, --level=NUMBER遞回層次的最大值(0不限制).
--delete-after刪除下載完畢的檔案.
-k, --convert-links改變沒有關連的連結成為有關連.
-m, --mirror開啟適合用來映射的選項.
-nr, --dont-remove-listing不要移除`.listing'檔.
遞回式作業的允許與拒絕選項:
-A, --accept=LIST允許的擴充項目的列表.
-R, --reject=LIST拒絕的擴充項目的列表.
-D, --domains=LIST允許的網域列表.
--exclude-domains=LIST拒絕的網域列表(使用逗號來分隔).
-L, --relative只跟隨關聯連結前進.
--follow-ftp跟隨HTML文件裡面的FTP連結.
-H, --span-hosts當開始遞回時便到外面的主機.
-I, --include-directories=LIST允許的目錄列表.
-X, --exclude-directories=LIST排除的目錄列表.
-nh, --no-host-lookup不透過DNS查尋主機.
-np, --no-parent不追溯到起源目錄.
範例一:mirror一個網站
wget -r www.redhat.com
範例二:mirror一個網站下的某個目錄:
wget -r www.redhat.com/mirrors/LDP
範例三:結合nohup在後台運行,讓機器自動下載,並生成nohup.out文件,紀錄下載過程的速度。
nohup wget -c -t0 -T120 -i list.txt &
wget -r -np http://physionet.org/physiobank/database/mimic2wdb/matched/
wget -r -np http://www.physionet.org/physiobank/database/sleep-edfx/ -A edf -P . --convert-links --level=1
用法: wget [選項]... [URL]...
命令的引數使用長項目與短項目相同.
使用遞回方式的取回:
-r, --recursive像是吸入web的取回--請小心使用!.
-l, --level=NUMBER遞回層次的最大值(0不限制).
--delete-after刪除下載完畢的檔案.
-k, --convert-links改變沒有關連的連結成為有關連.
-m, --mirror開啟適合用來映射的選項.
-nr, --dont-remove-listing不要移除`.listing'檔.
遞回式作業的允許與拒絕選項:
-A, --accept=LIST允許的擴充項目的列表.
-R, --reject=LIST拒絕的擴充項目的列表.
-D, --domains=LIST允許的網域列表.
--exclude-domains=LIST拒絕的網域列表(使用逗號來分隔).
-L, --relative只跟隨關聯連結前進.
--follow-ftp跟隨HTML文件裡面的FTP連結.
-H, --span-hosts當開始遞回時便到外面的主機.
-I, --include-directories=LIST允許的目錄列表.
-X, --exclude-directories=LIST排除的目錄列表.
-nh, --no-host-lookup不透過DNS查尋主機.
-np, --no-parent不追溯到起源目錄.
範例一:mirror一個網站
wget -r www.redhat.com
範例二:mirror一個網站下的某個目錄:
wget -r www.redhat.com/mirrors/LDP
範例三:結合nohup在後台運行,讓機器自動下載,並生成nohup.out文件,紀錄下載過程的速度。
nohup wget -c -t0 -T120 -i list.txt &
wget -r -np http://physionet.org/physiobank/database/mimic2wdb/matched/
wget -r -np http://www.physionet.org/physiobank/database/sleep-edfx/ -A edf -P . --convert-links --level=1
留言