Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using this command:

wget -nd -e robots=off --wait 0.25 -r -A.pdf http://yourWebsite.net/

but I can't get PDFs from the website.

For example I have a root domain name:

www.example.com

and this site have PDFs, DOCs, HTMLs, etc. I want to download all PDFs by inserting only the root domain name, not the exact address of the download page.

share|improve this question

1 Answer 1

The following command should work:

wget -r -A "*.pdf" "http://yourWebsite.net/"

See man wget for more info.

share|improve this answer
    
@Rădeanu.Not work . It get html page (index.html) and then stop process. –  PEDY May 18 at 13:22
1  
@PEDY the PDFs files must be linked by the index.html file, directly or indirectly, for wget to be able to find them. If they are just on the server, served by some script or dynamic php thing, wget will not be able to find them. The same problem happen if you want your PDF files searched by Google or similar thing; we used to have hidden pages with all the files statically linked to allow this... –  Rmano May 18 at 15:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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