Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The clear command can make the next command easier to read (if it outputs less than a page there's no scrolling hence no searching for the beginning). However it also clears the scrollback buffer which you may not always want.

share|improve this question
add comment

4 Answers

up vote 4 down vote accepted

Just press Ctrl-L on the keyboard.

share|improve this answer
    
Perfect. Don't know how I missed that. –  mcqwerty Jul 28 '11 at 12:58
    
Excellent. I would have answered just ^L if it weren't for the 30 char minimum! :) –  Andy Lee Robinson Jul 28 '11 at 18:11
add comment

Use tput reset

Thanks to this answer: Bash: Reset and Clear Commands

share|improve this answer
add comment

If you pipe the output to less, then not only will it clear the screen and show your output at the top, but it will switch back to the previous screen contents when you exit.

share|improve this answer
1  
Good point, less is powerful. But it's not quite what I'm looking for. If it outputs "less" than a full screen it doesn't start at the top and, as you allude to, it doesn't get added to the scrollback. –  mcqwerty Jul 26 '11 at 17:52
add comment

the clear command does not clear scrollback for me. so clear or ^L works.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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