What is the difference between Ctrl+L and Cmd+K for clearing the terminal screen?

Solution 1:

One difference is that Cmd+K clears the scrollback buffer as well as the screen. Ctrl+L only clears the screen, effectively moving what is on it "up" into the scrollback buffer.

Another difference is that Ctrl+L is performed by the process running inside Terminal. For instance, bash will clear the screen and redraw the prompt, including any unfinished command there. Other programs might not do anything, or might refresh the screen without clearing it.

Cmd+K, on the other hand, is performed by Terminal itself, regardless of what's running in the window, so it might hide the output from the program.

There are two short-cuts (or more) because you are interacting with two programs, Terminal and whatever process is running inside of it. I wouldn't say this is typical of OS X. Rather, it's a common occurence in any multi-layered computing environment. You'd have to run (only) DOS (without any TSR) to experience an environment where all keyboard short-cuts were interpretted by a single application. But since the two short-cuts in this case do different things, the overlap is really only superficial. For instance, Cmd+w and Cmd+q might appear to do the same thing to some users, but in fact, they are different. The same is true for Ctrl+L and Cmd+K.