Fedora Linux Support Community & Resources Center
  #1  
Old 10th June 2008, 07:18 PM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
clear doesn't actually clear the screen

When I compile a program, I would like to be able to scroll up and see the compiler outputs from the beginning. So I do

clear; make myprogram

The screen flashes clear and then starts compiling the code. The problem is, when I scroll up, the stuff that existed on the screen before i ran the clear command is still there! How can you actually get rid of the stuff that was there before so that when I scroll up it is very easy to see the beginning of the last command (because it is the only thing left!)?

Thanks!

Dave
Reply With Quote
  #2  
Old 10th June 2008, 07:34 PM
blueboy4 Offline
Registered User
 
Join Date: Jan 2007
Posts: 73
That's how clear works; it just pushes stuff off the screen. I'm not sure you can get rid of the other commands and their outputs but I could be wrong.

Have you tried redirecting the output of your make myprogram to a file?
Code:
 make myprogram > file
I'm not sure if the result of the make command will still be displayed though.
Reply With Quote
  #3  
Old 10th June 2008, 07:36 PM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
It would be nice to just scroll up instead of opening the file that the output was redirected to - surely there is a way to do this?
Reply With Quote
  #4  
Old 10th June 2008, 08:47 PM
Dangermouse Offline
Administrator - (On Leave)
 
Join Date: Aug 2007
Location: London Postbox (the red one)
Age: 49
Posts: 3,864
Hi this may help you a bit to record what happens in a terminal
http://linux.byexamples.com/archives...-replay-later/
or a more simple way is just go to edit in a terminal and change the current profile (increase scrolling and size)
and if you want to get rid of the history altogether then type
Quote:
history -c
Attached Thumbnails
Click image for larger version

Name:	profile.png
Views:	110
Size:	25.6 KB
ID:	16348  
Reply With Quote
  #5  
Old 10th June 2008, 09:01 PM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
history -c doesn't seem to remove anything from the terminal, just the "history" (ie. when you type history there is nothing in the list anymore)

recording the terminal is cool , but not any better than > in this case !

any other ideas on how to actually clear the terminal so when you scroll up there is nothing there?
Reply With Quote
  #6  
Old 10th June 2008, 09:05 PM
EnglandA Offline
Registered User
 
Join Date: May 2005
Location: UK
Posts: 250
Try typing "reset" instead of "clear". Also useful when you accidentally cat a binary file and your prompt goes all double-dutch on you =o)
Reply With Quote
  #7  
Old 10th June 2008, 09:06 PM
daviddoria Offline
Registered User
 
Join Date: Oct 2007
Posts: 884
ahhh sweet - thats what I was looking for!!
Reply With Quote
  #8  
Old 8th December 2008, 10:43 PM
jimbux Offline
Registered User
 
Join Date: Apr 2008
Location: Dallas, TX
Age: 52
Posts: 146
'reset' works, it's just kinda sluggish. Many years ago I had "clear" aliased to some escape sequences that would clear the scroll buffer and the screen. This used to work on an SGI:
Code:
alias clear "echo -n '\033[14/y'"
I can't find anything for xterm that works like that. It would be wonderful if /usr/sbin/clear had an option to clear an xterm's scroll back buffer.

Ya, you can use "reset" (alias clear to reset) but I'm not as fond of how it works as how snappy and wonderful those old escape sequences worked. As the OP said, I also do the kind of thing he mentioned all the time. I.e.,
Code:
% clear; <some_verbose_command>
so that I can grab the scroll bar, and jam it up to the top and quickly find all the output from the command.

Anyone have any knowledge about some magic xterm escape sequence that WILL clear the scroll back buffer?

J.
Reply With Quote
Reply

Tags
clear, screen

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to clear and reinstal MBR? kpfuser Installation, Upgrades and Live Media 1 23rd March 2009 11:26 AM
Clear History edison99917 Using Fedora 2 29th August 2008 02:24 AM
2.6.13-1.1532_FC4 clear recent documents doesn't clear list c0ldshadow Using Fedora 3 9th November 2005 05:35 PM
/tmp fills up and doesn't clear itself Secret Agent Using Fedora 0 10th January 2005 12:55 AM


Current GMT-time: 18:18 (Tuesday, 21-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Abbottabad Photos on Instagram - Putyvl Photos on Instagram - Valdivia Photos