Clear the terminal on a mac
The keyboard shortcut to clear the terminal on your mac is
Command + K
Why do I find this useful?
Theclear
command only clears the viewport, which means, if you scroll up, you can still see all the previous content of the terminal. Whereas pressing Command + K
cleans up the terminal so there's nothing to scroll.
I found this useful when writing unit tests and not wanting to lose myself in long scrolling terminals when trying to identify failing tests. Its pretty much feels like you are starting your terminal with a clean slate!