Restoring curl

Joined
Apr 12, 2013
Messages
2
Reaction score
0
Points
1
Hello everyone,
I did something stupid and need your help.

Thing is, I am kind of new to OSX and I am just trying to find my way around this system. I am used to work on linux machines. And just right now one of my download scripts refused to work.
(I often build little download scripts, because I am on a volume limit with my internet and can't cancel my contract for another one and a half year, so I download what I need at a friend's place.)
Anyway, the reason why my script didn't work was quite simple. I didn't have "wget" on my system.

A simple google question later, I found out that OSX is using curl, but I was unsuccesful finding a follow option similar to wget -f in the man of curl, so I decided to install wget on my system. I found a precompiled version of wget. But I still didn't know where to put it. I figured it would be in the same folder as curl is in. So I ran a "find / -name curl 2>/dev/null" and found curl in /usr/bin/curl. (Could have guessed that.. But after the home folder isn't in /home/username/ I've became careful.)

Anyway, this is the moment when my stupidity struck.
Half overtired, half distracted, I typed in without thinking or looking on my screen:
"sudo mv -v /Users/myname/Downloads/wget /usr/bin/curl"
D'oh!!!

Don't ask me why I did that.. It just happened.
Well, I renamed it to wget and made it executable and my script is working now, but I overwrote curl's binary. And now, I am wondering how to restore it.
Any help?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
There are older versions of the binary here. However, if you want/need a more modern version, simply install a package manager such as Homebrew or MacPorts and use those to build it.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top