 |
 |
Stop Terminal From Clearing Previous Output
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status:
Offline
|
|
I apologize for asking this question, since I know I already read it somewhere on the forums. I'm wondering how to prevent Terminal from clearing the output of a program just quit. For example, display top and then press q. The buffer is cleared and the only thing displayed is a blank prompt. This wasn't the way Jaguar's terminal acted, so I'd like to restore the functionality.
|

"The natural progress of things is for liberty to yield and government to gain ground." TJ
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Nov 2001
Location: Adelaide, South Australia
Status:
Offline
|
|
One way is to change your TERM environment variable from "xterm-color" to "vt100".
The vt100 setting isn't too bad, so not much is lost. So if you're using bash or zsh just
export TERM=vt100
in one of your initialization files, and if you're using tcsh just use
setenv TERM vt100
in your .login file.
Cheers,
Paul
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Originally posted by Big Mac:
... For example, display top and then press q. The buffer is cleared and the only thing displayed is a blank prompt. ...
You could also run the command:
top -l 1
And get a single screenful of top dumped to the terminal or, alternatively, to a file.
top -L n
Where n is the number of process lines you want to display is also handy.
|
|
-DU-...etc...
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Status:
Offline
|
|
Or use your mouse, highlight and copy the part you're interested in and paste it after you quit top.
-
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2002
Location: London
Status:
Offline
|
|
Paul has the right idea if you want the same behaviour as Jaguar:
One way is to change your TERM environment variable from "xterm-color" to "vt100".
But you can just go to the Terminal->Preferences pane and select 'vt100' from the popup list to do exactly the same thing.
It isn't just 'top' that is affected, so is 'man' and anything that uses 'less'.
If you want to keep the 'xterm-color' there are ways of preventing it clearing the window for these applications. For bash, you can put:
Code:
export LESS='-XRse'
in .login, or for tcsh:
Code:
setenv LESS '-XRse'
But I'm not sure if this helps with 'top'.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |