Suppose in bash you start writing a command like:
$ rm -rf /foo/bar/really/long/path/here
and then realize you don\'t want to execute this
A nice shortcut is pressing Esc#. It will prepend a # character (thus making the line a comment) and then press enter. If you then decide that you still the need the command, you still have it in your history :)
#