Can running `yes > /dev/null` harm a Mac? I recently ran yes &gt; /dev/null for a 3 minutes to drain my Mac's battery. During that time, the temperature rose to 72 °C and fans spun up to 4000 RPM. I immediately quit the process. 

Should I fear that has this damaged hardware or the logic board?
The instructions for yes have this little gem from the man page :


  Using yes results in 100% processor usage, for this reason it is
  rarely used other than for testing e.g. to max out a computer's CPU.


Which means, no, you will not have damaged your hardware. Using the yes command is a way of using all (i.e. 100%) of your CPU. The symptoms you experienced (i.e. a rise in temperature and the resulting increase in fan RPM) are to be expected under these circumstances.  Additionally, your CPU will "throttle back" and ultimately shut down if its thermal threshold is exceeded to prevent damage.