1
wget -nd -a pdf -o drgnchain.pdf https://dragonchain.com/assets/Dragonchain_Business_Summary.pdf

I would expect the downloaded PDF to be named drgnchain.pdf and be the sole file after executing this command. However, not only does this command unexpectedly get me 2 files, but drgnchain.pdf is not a valid PDF either.

I get these 2 PDFs:

screenshot

I thought -o would save the PDF with custom name, but it doesn't seem to be working. What am I missing?

  • 1
    I think you're confusing wget with curl. Both -o and -a are about log files, not the data you're downloading. You probably meant -O (capital O) where you have -o (little oh). – barrycarter Apr 23 '18 at 22:31
  • Oh, that's the answer, lol. I didn't even know flags were case sensitive. I spent 2 hours thinking about this. Thanks! – Συλχαν Apr 23 '18 at 22:33
  • @barrycarter Definitely -O. Make it your answer and I will upvote it. – Kamil Maciorowski Apr 23 '18 at 22:55
  • @KamilMaciorowski I don't believe in the points system. I'm just happy to help people. Feel free to post it yourself – barrycarter Apr 23 '18 at 22:58
1

Both -o and -a are about log files, not the data you're downloading. Option switches are case sensitive. You probably meant -O where you have -o.

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.