Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Clear the terminal screen from the keyboard UNIX
Here is another shortcut (undocumented I believe) I found accidentally for use in a terminal window. Hitting Option-A will clear the screen as would the command 'clear'.

[Editor: You can also use Control-L, which is more standard]
  • Currently 1.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)

Clear the terminal screen from the keyboard | 5 comments | Create New Account
Click here to return to the 'Clear the terminal screen from the keyboard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
More tcsh fun (save time typing in the shell)
Authored by: Anonymous on May 08, '01 11:19:10PM

There are lots of tcsh commands that help you navigate around when playing in the terminal.

Ctrl-a : back to begining of line
Ctrl-e: end of line
Ctrl-k: kills everything from the cursor to the end of line
Ctrl-b: moves cursor back (like the back arrow, but you don't have to move your hand as much)
Ctrl-f: moves the cursor forward
tab: completes the filename you are typing, very useful if you also set an environment
variable in your ~username/.tcshrc file like this "set autolist" alone on a line. Try the tab with
and without the environment variable. If you hate the beeping, put this environment variable
on another line "set nobeep"
The up arrow: scrolls through last commands
!!: The last command
!$: The last word of the last command, really cool when you are doing something with a file
% vi
% chmod +x !$
% !$
The shell will replace !$ with test .pl

There are lots of other tricks, but these are the ones I use the most, and the tcsh manpage is somewhat long-winded.

[ Reply to This | # ]
More tcsh fun (save time typing in the shell)
Authored by: Anonymous on May 09, '01 04:40:24AM

And some of those are also mapped to Command keys.
So Command (aka Apple)-K will clear the screen, too, as I found by accident ;-)

Maybe there are more of those...

[ Reply to This | # ]
More tcsh fun (save time typing in the shell)
Authored by: olly73 on May 09, '01 05:43:40AM

only CTRL+L will clear the screen. command + a change the background color.

[ Reply to This | # ]
Command vs option
Authored by: robg on May 09, '01 09:04:16AM

Actually, COMMAND-A is selecting all the text, which is why the screen appears to change colors; if you hit OPTION-A, the screen will clear.

[ Reply to This | # ]
clearing screen by tput
Authored by: europacode on Feb 04, '02 11:59:28PM

you can also clear the screen by using a command called tput and the option clear. ex: tput clear.

there are other options for tput too for controlling the terminal display. see the man page for more info, you can also do alot of other things with tput too. i dont think this one has been mentioned yet.

i usually make an alias called 'cls' to make it easier....
alias cls='tput clear'

[ Reply to This | # ]