Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download multiple PDFs with curl in Terminal.app

Tags:

terminal

curl

In terminal.app I entered this line

curl -o http://print.nap.edu/pdf/0309065577/pdf_image/[1-319].pdf

And it in Terminal it says:

curl: no URL specified!

How is this possible? I'm just trying to download a bunch of successively numbered PDF files from a web server. If I leave off the -o it just downloads a bunch of gibberish into the Terminal window but not as a file. Am I doing anything wrong here?

like image 376
sxflynn Avatar asked Dec 20 '10 23:12

sxflynn


People also ask

How do you download multiple files on Curl?

Download multiple files simultaneously To download multiple files at the same time, use –O followed by the URL to the file that you wish to download. The above command will download both files. The above Curl command will download all the URLs specified in the files.

How can I download PDF files in bulk?

Using Adobe Acrobat Pro's “Combine Files into PDF” function, select all the PDFs for one volume, combine them, then save the file. Note: I usually prefer to use free tools, but I happen to have Adobe Acrobat Pro on my computer. To find a free tool to merge PDFs, do a Google search for “combine pdfs free.”

How do I download files using Curl Windows?

To download a file with Curl, use the --output or -o command-line option. This option allows you to save the downloaded file to a local drive under the specified name. If you want the uploaded file to be saved under the same name as in the URL, use the --remote-name or -O command line option.

How do I download a folder using Curl?

To download you just need to use the basic curl command but add your username and password like this curl --user username:password -o filename. tar. gz ftp://domain.com/directory/filename.tar.gz . To upload you need to use both the –user option and the -T option as follows.


1 Answers

Try

curl -o file_#1.pdf 'http://foo.bar/abc/[1-319].pdf'

note two things: (1) the placeholder #1 in the (2) output file name

like image 196
Mitro Avatar answered Sep 18 '22 19:09

Mitro