我目前正在嘗試使用 wget 從 https 伺服器下載資料。有很多子資料夾和文件,但只有一個檔案副檔名 (*.raw) 令我感興趣。 (不需要父資料夾)
已嘗試過這些命令:
wget --recursive --no-directories --no-parent --level 10 --accept "raw" --execute robots=off https://cptc-xfer.uis.georgetown.edu/publicData/Phase_II_Data/TCGA_Ovarian_Cancer_S_026/
和
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://cptc-xfer.uis.georgetown.edu/publicData/Phase_II_Data/TCGA_Ovarian_Cancer_S_026/
但是,使用包含感興趣文件的目錄之一輸入相同的命令是有效的(但不是必需的,因為應該手動完成)
wget --recursive --no-directories --no-parent --level 10 --accept .raw --execute robots=off https://cptc-xfer.uis.georgetown.edu/publicData/Phase_II_Data/TCGA_Ovarian_Cancer_S_026/TCGA_09-1664-01A_61-2094-01A_25-1312-01A_Proteome_JHUZ_20130802/TCGA_09-1664-01A_61-2094-01A_25-1312-01A_Proteome_JHUZ_20130802_raw/
知道如何制定命令來獲取文件嗎?先謝,維維安
答案1
對第一個命令的簡單編輯解決了問題。
wget --recursive -nd --no-parent --level 10 --accept "*.raw" --execute robots=off https://cptc-xfer.uis.georgetown.edu/publicData/Phase_II_Data/TCGA_Ovarian_Cancer_S_026/