![](/img/trans.png)
[英]How can i remove “<MAXROWS/>” string from all 30 files in my directory through linux / unix command?
[英]How can I download all the files from a remote directory to my local directory?
我想將所有文件下載到我網站的特定目錄中。
假設我的遠程SFTP目錄中有3個文件
www.site.com/files/phone/2017-09-19-20-39-15
我的目標是僅使用那些下載的文件在桌面上創建本地文件夾。 不需要父母文件或父母目錄。 我正在嘗試獲得干凈的報告。
wget -m --no-parent -l1 -nH -P ~/Desktop/phone/ www.site.com/files/phone/2017-09-19-20-39-15 --reject=index.html* -e robots=off
我如何調整wget命令以獲取類似信息?
除了wget之外,我還應該使用其他任何東西嗎?
hu
從shell程序角度看,我建議您嘗試以下命令行腳本,注意我也添加了引文,以便您可以看到原始線程。
wget -r -P ~/Desktop/phone/ -A txt www.site.com/files/phone/2017-09-19-20-39-15 --reject=index.html* -e robots=off
-r啟用遞歸檢索。 有關更多信息,請參見遞歸下載。
-P設置所有文件和目錄保存到的目錄前綴。
-A設置白名單以僅檢索某些文件類型。 字符串和模式都可以接受,並且都可以在逗號分隔的列表中使用。 有關更多信息,請參見文件類型。
參考:@ don-joey https://askubuntu.com/questions/373047/i-used-wget-to-download-html-files-where-are-the-images-in-the-file-stored
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.