Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using:

wget -r -A pdf

but instead of pdf's I get this output in console:

--2013-03-23 15:11:03--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: [following]
--2013-03-23 15:11:09--
Reusing existing connection to
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html] Permission No such file or directory

Cannot write to `' (Success).

How can I do this properly?

share|improve this question
Can you run mkdir and see what happens? Then, try the same wget command again. – slhck Mar 23 '13 at 15:57

You can use this example, but I do not think that it will grab from subfolders.


14. Download Only Certain File Types Using wget -r -A

You can use this under following situations:

Download all images from a website Download all videos from a website Download all PDF files from a website

$ wget -r -A.pdf http://url-to-webpage-with-pdfs/

You may also need to change the browser agent so your wget does not appear as a spider.

share|improve this answer
This is the same as I posted above. If I leave out the -A.pdf part it works otherwise it doesn't. – Primož Kralj Mar 23 '13 at 14:30
What is an example URL of a PDF file located on this site? – kobaltz Mar 23 '13 at 14:38
The OP is right, this command should work but doesn't. I also tried what was suggested here but no luck. It works for non pdf files (.png, for example) but fails specifically for PDFs. – terdon Mar 23 '13 at 15:30

You must log in to answer this question.

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