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
There are two options to do this
ctrl+c - this clears the whole line, no matter where the cursor is.
ctrl+u - this clear the line from the position of the cursor until the beginning.