I usually use wget to download remote file, the command I use:

wget --timeout=5 --tries=1 --referer=http://www.example.com 'http://www.example.com/abcdefg123.jpg' -O image.jpg

As you can see, there are 3 options: --timeout, --tries, and --referer.

I wonder what is the proper / equal command in cURL that has similar options in wget?

  • 1
    I suggest reading man curl
    – John
    Jun 9, 2015 at 17:12

2 Answers 2


I don't think there is an exact equivalent to the last detail, but something like this might work:

curl -L --connect-timeout 5 --retry 1 --referer http://www.example.com -o image.jpg http://www.example.com/abcdefg123.jpg
curl --retry 1 --connect-timeout 5 -o image.jpg -e 'http://www.example.com' http://www.example.com/abcdefg123.jpg

There is also timeout option -m for the operation, depending on what you need.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .