mirror http website, excluding certain files

前端 未结 4 2129
無奈伤痛
無奈伤痛 2021-02-14 19:17

I\'d like to mirror a simple password-protected web-portal to some data that i\'d like to keep mirrored & up-to-date. Essentially this website is just a directory listing wi

4条回答
  •  旧时难觅i
    2021-02-14 19:36

    Parameter --reject 'pattern' actually worked for me with wget 1.14.

    For example:

    wget --reject rpm http://somerpmmirror.org/site/
    

    All the *.rpm files were not downloaded at all, only indexes.

    Warning: File patterns can be unintentionally expanded by bash if they match a file located in working directory. Please use quotes to avoid that:

    touch blahblah.rpm
    # working
    wget -R '*.rpm' ....
    # working
    wget -R "*.rpm" ....
    # not working
    wget -R *.rpm ....
    

提交回复
热议问题