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

前端 未结 14 2105
再見小時候
再見小時候 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:23

    Here's the complete wget command that worked for me to download files from a server's directory (ignoring robots.txt):

    wget -e robots=off --cut-dirs=3 --user-agent=Mozilla/5.0 --reject="index.html*" --no-parent --recursive --relative --level=1 --no-directories http://www.example.com/archive/example/5.3.0/
    

提交回复
热议问题