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 https://labraj.uni-mb.si

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

--2013-03-23 15:11:03--  https://labraj.uni-mb.si/
Resolving labraj.uni-mb.si (labraj.uni-mb.si)... 164.8.230.26
Connecting to labraj.uni-mb.si (labraj.uni-mb.si)|164.8.230.26|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://labraj.uni-mb.si/Splo%C5%A1ne_informacije [following]
--2013-03-23 15:11:09--  https://labraj.uni-mb.si/Splo%C5%A1ne_informacije
Reusing existing connection to labraj.uni-mb.si:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
labraj.uni-mb.si: Permission deniedlabraj.uni-mb.si/index.html: No such file or directory

Cannot write to `labraj.uni-mb.si/index.html' (Success).

How can I do this properly?

share|improve this question
    
Can you run mkdir labraj.uni-mb.si 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.

From http://www.thegeekstuff.com/2009/09/the-ultimate-wget-download-guide-with-15-awesome-examples/

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
1  
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 .