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

前端 未结 14 2059
再見小時候
再見小時候 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条回答
  •  萌比男神i
    2020-11-27 09:25

    If --no-parent not help, you might use --include option.

    Directory struct:

    http:///downloads/good
    http:///downloads/bad
    

    And you want to download downloads/good but not downloads/bad directory:

    wget --include downloads/good --mirror --execute robots=off --no-host-directories --cut-dirs=1 --reject="index.html*" --continue http:///downloads/good
    

提交回复
热议问题