I need to create a mirror of a directory shared over HTTP. Source server uses apache index module. Here is an example of a similar directory: http://apache.mirrors.pair.com/httpd/

The content is not available over FTP.

I can use wget to download the mirror recursively. The side effect is that in this case there are index.html?.... files created.

I wonder if there is an utility which can do this easily, without need to cleanup destination directory manually?

  • lftp has a mirror command, and I have used to it mirror the Arch Linux repos. But you should see if there's some custom solution, like apt-mirror, before turning to options like lftp.
    – muru
    Nov 17, 2014 at 17:50

1 Answer 1


I think that you are looking for mirror option for wget, -m.

wget -m http://www.example.com/
  • Have you read the question? Nov 18, 2014 at 11:59
  • Ahh dude, I should have let my test run finished. Sorry about that. How about ignoring '-R index.html*,foo,bar' and get them separately?
    – a21
    Nov 18, 2014 at 13:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .