Using curl to quickly fetch images from the web
Just now I had 48 images in a web directory that I needed to download. Being lazy efficient like I am, I wasn’t about to settle for right-clicking on each one and downloading it – oh, the horror. A quick hit on Google, and I found this little gem for curl, which is installed by default on OS X:
curl -O http://site/path/file-[001-048].jpg
Where the files where named file-001, file-002….file-048. curl allows you to bracket the range of numbers. Fetched ‘em all in about 15 seconds. The -O flag tells curl to save the file locally with the same remote filename. Personally, I’ve been a fan of wget on Windows for years, but curl worked great for this on the Mac.


