I want to download all *httpd* RPM file from remote CentOS mirror and I am trying he following command but it doesn't seem to work

[root@yum foo]# wget -r --no-parent -A "*httpd*" https://mirrors.edge.kernel.org/centos/7.5.1804/os/x86_64/Packages/

I see that it created a directory structure, but there are no files in the directories.

[root@yum foo]# ls
mirrors.edge.kernel.org

what I am doing wrong?

up vote 4 down vote accepted

The web site you're trying to do this on has a robots.txt file that includes

User-Agent: *
Disallow: /

When in recursive mode, wget obeys this file, and so refuses to do recursive copies.

  • any solution here or any other tool like curl ? – Satish Dec 6 at 3:02
  • 1
    Use a different mirror that doesn't have a robots.txt ? eg wget -r --no-parent -A "*httpd*" https://mirrors.xmission.com/centos/7.5.1804/os/x86_64/Packages/ works as expected – Stephen Harris Dec 6 at 3:12
  • Thank you so much!!! – Satish Dec 7 at 15:20

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.