Using wget to recursively fetch a directory with arbitrary files in it

前端 未结 14 2113
再見小時候
再見小時候 2020-11-27 08:31

I have a web directory where I store some config files. I\'d like to use wget to pull those files down and maintain their current structure. For instance, the remote directo

14条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 09:10

    To download a directory recursively, which rejects index.html* files and downloads without the hostname, parent directory and the whole directory structure :

    wget -r -nH --cut-dirs=2 --no-parent --reject="index.html*" http://mysite.com/dir1/dir2/data
    

提交回复
热议问题