The clear command reads your
termcap or terminfo (5.2)
entry to find out how to erase your screen, then it sends that command.
If you're typing something confidential that other people shouldn't
read, just type clear
at a shell prompt when you can.
Many UNIX programs let you do a
shell escape (30.26)
to run a single UNIX command - you can clear your screen that way, by
typing something like !clear
from inside the program.
NOTE: Some terminals and window systems have memories - scrolling buffers that save previous screens or the current one. The clear command probably won't clear those. Check your manual to find out how - or, if you're desperate, log off UNIX, then turn off your screen's power for a minute.
If you leave your desk for a long meeting or for the day, then remember that you didn't erase your screen, you can probably clear your screen from another user's terminal. (If your system has the tty-group-write protection (22.13), then you'll have to log in or su (22.22) to your account from the other terminal first.) If the other terminal has the same terminal type, use the command:
who | % who |
---|
If you're on a different type of terminal, you'll need to set the TERM environment variable temporarily (6.10) before you use that command.
-