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

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

    You should use the -m (mirror) flag, as that takes care to not mess with timestamps and to recurse indefinitely.

    wget -m http://example.com/configs/.vim/
    

    If you add the points mentioned by others in this thread, it would be:

    wget -m -e robots=off --no-parent http://example.com/configs/.vim/
    

提交回复
热议问题