I want to download from remote http server all files directories,files and so on. I found some solutions to ftp server,but doesn't work to http. Until now no luck with wget -r or -m. It download all direcotories in the root and the respective index.html. Not all files and sub-directory under such it(note the sub-directory may have another directory and so on)

not sure on tags fix for me if needs. Note: I'm not a native english speaker,sorry for bad english.

  • 1
    Using wget to recursively fetch a directory with arbitrary files in it - stackoverflow.com/questions/273743/… – Logman Dec 16 '12 at 22:30
  • or you might not have access to the file/dirs – Logman Dec 16 '12 at 22:33
  • Until at moment is working fine. I'm downloading the directories and its contents. I'd love to suggest to you: port this comment to answer and I give +1 and mark as accept if such options to wget will do what I'm looking for. Thanks very much! – Jack Dec 18 '12 at 16:03
  • you can just upvote my comment if you want, and give the guy in the link an upvote too ...thanks though – Logman Dec 19 '12 at 0:52
  • @Logman: Done! :) – Jack Dec 19 '12 at 1:08

Web servers don't give you a directory listing. (Not unless you tell them to do so.) SO, in the general case, this is impossible.

You can probably use rsync+ssh for this. Or FTP.

  • +1 Thanks for your reply. wget application is doing the job with -r --no-parent --reject "index.html*" flags,as was suggested by the Jeremy Ruten's answer in the stackoverflow linked by Logman. I forget to mention,it's a http server,but do the files directories listing exactly as a FTP server. – Jack Dec 18 '12 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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