How to restore a removed /bin/sh file? I have followed a guide online which requested me to run this command:

sudo cp /opt/local/bin/node /bin/sh


It was a guide for fixing LESS. Instead of fixing it, it only made it worse. I have lost the file.

Is there any way to recover/refetch this file, or could someone upload their sh file for me?
Run this command to copy /bin/sh from the BaseSystem.dmg on the Recovery HD:

diskutil mount Recovery\ HD &amp;&amp;
    hdiutil mount /Volumes/Recovery\ HD/com.apple.recovery.boot/BaseSystem.dmg &amp;&amp;
    sudo cp -p /Volumes/OS\ X\ Base\ System/bin/sh /bin/sh


Also see How can I get back a system file after deleting it from my Mac?