Ubuntu – How to download PDFs of a website by using only the root domain name

14.04command linewget

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:


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.

Best Answer

The following command should work:

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

See man wget for more info.

Related Question