Monday, July 30, 2007

Clear the Terminal Screen

I use the clear command to clear out the contents of a screen. It's similar to executing a new xterm without the extra window. I sometimes use it, afterwards, when I inadvertently cat/opened a file (e.g. binary file) that can cause extraneous characters to show up in my xterm or command tool interface. You might also want to use it to prevent prying eyes (i.e. competitors, nosy sysadmins, passwords, etc). Here is the syntax to clear your xterm window.

# clear

1 comment:

Anonymous said...

Or hit ^L (in bash) as it can be used at any time.

I find this

$ clear; make

works well to remove the clutter from older commands.