How would I create an icon on my Mac OS X desktop, to do a "shut down"? (With... or without... the "are you sure" verification.)
Open AppleScript Editor.
Paste in the following code:
tell application "Finder" to shut down
Click File » Save, save it to the Desktop, selecting File Format: Application.
If you've saved it as the correct format, the icon should look like this:
If you're just looking for a very quick and convenient way to shut down, hit the power button on any MacBook, or Ctrl-Eject on any desktop keyboard, then hit Return or Enter to accept the default (Shut down).
If you are looking for an even faster way to shut down without having to click on an icon, press fn + control + alt/option+ command/apple + eject button to have it immediately shut down without any prompt.
Type "sudo halt" in Terminal and then cd desktop it so when you open it will close. To restart it, replace "halt" with "reboot"