如何組合這些wget?

如何組合這些wget?

我想下載許多文件類型.dat、.hea...我沒有找到該結構的任何證據-A ".dat|.hea"。命令

wget -r -l1 --no-parent -A ".dat" https://www.physionet.org/physiobank/database/nsrdb/
wget -r -l1 --no-parent -A ".hea" https://www.physionet.org/physiobank/database/nsrdb/
wget -r -l1 --no-parent -A ".hea-" https://www.physionet.org/physiobank/database/nsrdb/
wget -r -l1 --no-parent -A ".hea--" https://www.physionet.org/physiobank/database/nsrdb/
wget -r -l1 --no-parent -A ".xws" https://www.physionet.org/physiobank/database/nsrdb/
wget -r -l1 --no-parent -A ".atr" https://www.physionet.org/physiobank/database/nsrdb/
wget -r -l1 --no-parent -A ".atr-" https://www.physionet.org/physiobank/database/nsrdb/

Debian:8.5
Wget:基於 linux-gnu 建構的 GNU Wget 1.16

答案1

-A選項-R採用逗號分隔清單。

例如

wget -r -R -l1 --no-parent -A ".dat,.haa,.hea-,.hea--,.xws,.atr,.atr-" https://www.physionet.org/physiobank/database/nsrdb/

從手冊頁

-A acclist --接受 acclist

-R 拒絕列表 --拒絕拒絕列表

指定要接受或拒絕的以逗號分隔的檔案名稱後綴或模式清單。請注意,如果任何通配符 *、?、[ 或 ] 出現在 acclist 或 rejlist 的元素中,它將被視為模式,而不是後綴。

相關內容