1

Is there a way (MAC OSX) to keep all the commands you entered in the terminal history but clear all the results of those commands from the visual display?

5
  • That is the default behavior. Commented Feb 8, 2012 at 12:37
  • What is? - the behaviour I'm asking for (keep command history but erase outputs) or the behaviour I want to over-ride (keep both or erase both (by restarting terminal))?
    – wheresrhys
    Commented Feb 8, 2012 at 12:41
  • Default behaviour is for history to only contain the commands you enter, not any output.
    – Paul R
    Commented Feb 8, 2012 at 12:49
  • ok, I suppose I meant "the visual display" then and will edit the question to reflect this. But who votes to close a question about the terminal for being off topic?
    – wheresrhys
    Commented Feb 8, 2012 at 13:15
  • 1
    Question belongs on superuser.com or apple.stackexchange.com, since it's not programming-related.
    – Paul R
    Commented Feb 8, 2012 at 14:35

1 Answer 1

2

The keystroke ctrl-L or the command clear will clear the screen. Your Bash history is not affected at all.

1
  • 5
    Although those only clear the terminal screen. They don't clear the scrollback, if that's what @wheresrhys is asking. For that, use View > Clear Scrollback (Command-K).
    – Chris Page
    Commented Feb 10, 2012 at 18:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.