4 ms·
wget -rA "SEv2*.pdf" --no-parent --level=0 http://www.cl.cam.ac.uk/~rja14/book.html http://www.cl.cam.ac.uk/~rja14/book.html
by SkyMarshal 14y ago
wget -rA "SEv2*.pdf" --no-parent --level=0 http://www.cl.cam.ac.uk/~rja14/book.html http://www.cl.cam.ac.uk/~rja14/book.html
- lobotryas 14y agoThank you for posting that command! It got me to read the wget man page in order to understand what you did and now I have another useful tool I can add to my arsenal.
- lucb1e 14y agoWas about to do this, then figured someone on HN probably had a pdf available already. And indeed ^^. Thanks anyway, saves me having to figure out the wget params.
- dmiladinov 14y agoStitch those PDFs together while you grab coffee! Run this in the directory where you just wgot the pdfs: files=`ls | grep toc && ls | grep pref && ls | grep ack && ls | grep c && ls | grep bib && echo ls | grep index`; gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=SecurityEngineering2ndEd.pdf $files When you get back, you should have a single file, SecurityEngineering2ndEd.pdf (edit the command to name yours whatever you like) Edit: This assumes you're running a unix variant and have ghostscript (gs) installed Edit: Use this instead in case toomuchtodo's dropbox link doesn't work for you (like what happened for me: "This account's public links are generating too much traffic and have been temporarily disabled!")
- keenerd 14y agoGS is really slow at this. Pdfunite from Poppler is faster. wget http://www.cl.cam.ac.uk/~rja14/Papers/book2coverlarge.jpg convert book2coverlarge.jpg cover.pdf pdfunite cover.pdf *toc.pdf *pref.pdf *acks.pdf SEv2-c*.pdf *biblio.pdf *index.pdf SEv2.pdf
- dmiladinov 14y agoAwesome, thanks for the tip!
- ableal 14y agoDebian/Ubuntu repositories have pdftk, which has been good enough for all my PDF merge/split/etc needs. E.g. 'pdftk *.pdf cat output combined.pdf'; 'pdftk -h' has more examples